WP-ShowHide

Leírás

By default the content is hidden and user will have to click on the “Show Content” link to toggle it. Similar to what Engadget is doing for their press releases. Example usage: [showhide type="pressrelease"]Press Release goes in here.[/showhide]

Usage

  1. By default, content within the showhide shortcode will be hidden.
  2. Example: [showhide]Press release content goes in here.[/showhide]
  3. Default Values: [showhide type="pressrelease" more_text="Show Press Release (%s More Words)" less_text="Hide Press Release (%s Less Words)" hidden="yes"]

  4. You can have multiple showhide content within a post or a page, just by having a new type.

  5. Example: [showhide type="links" more_text="Show Links (%s More Words)" less_text="Hide Links (%s Less Words)"]Links will go in here.[/showhide]

  6. If you want to set the default visibility to display.

  7. Example: [showhide hidden="no"]Press release content goes in here.[/showhide]

  8. You can style the content via CSS that is generated by the plugin. Here is a sample of the generated HTML. Note that pressrelease is the default type.

<div id="pressrelease-link-1" class="sh-link pressrelease-link sh-hide">  
  <a href="#">  
    <span id="pressrelease-toggle-1">Show Press Release (4 More Words)</span>  
  </a>  
</div>  
<div id="pressrelease-content-1" class="sh-content pressrelease-content sh-hide" style="display: none;">Content</div>
  1. With the example above, here are the following styles you can use in your CSS:
.sh-link A { }  
.sh-content { }  
.pressrelease-link { }  
.pressrelease-link.sh-hide A { }  
.pressrelease-link.sh-show A { }  
.pressrelease-content { }  
.pressrelease-content.sh-hide { }  
.pressrelease-content.sh-show { }

Build Status

Fejlesztés

https://github.com/lesterchan/wp-showhide

Fordítók

http://dev.wp-plugins.org/browser/wp-showhide/i18n/

Köszönet

Adományok

A szabad időm nagy részét a bővítmény megalkotásával, frissítésével, karbantartásával és a támogatással töltöm. Amennyiben a bővítményt igazán hasznosnak tartjuk, ne sajnáljunk néhány dolcsit ennek a kedves, szeretetreméltó szerzőnek adományozni, mert igazán jól jönne neki is egy kis segítség. Ha nincs lehetőségünk adni pár dollárt, akkor sincs nagy baj; minden további nélkül használjuk sok szeretettel a bővítményt. Majd, a egyszer tellik rá, akkor ne feledje… 😉

Képernyőmentések

  • Show More - Press Release
  • Hide More - Press Release
  • Editor - Short Code

GYIK

N/A

Vélemények

2020.06.22.
After hours searching for such a fonctionality, I endly found this. Simple and efficient. Thanks. Après des heures à chercher une solution, j'ai trouvé celle-ci. Simple et efficace. Bravo et merci.
2020.05.08.
作者的意思可能是基于经典编辑器的HTML模式来自定义,实际上可以直接修改插件,将A标签替换为button并定制一个class,再全局内添加此class的CSS就可以使其拥有漂亮的按钮样式了。 此方法在古腾堡编辑器下也可以使用。
2020.04.29.
Exactly what I was looking for, thanks!
2020.04.28.
After hours of searching for a plugin to insert "read more" tag to use for page, this plugin has saved me from so much stress and disappointment after hours of trying everything on google search. Hope a little of my donation would help you carry on and maintain this plugin. Thanks
2020.02.23.
For some reason, the plugin works only in posts and pages, and in the description of tags and categories - just the code itself shows. If anyone knows how to configure the plugin so that it works for any type of WordPress text, please respond!
2019.11.11.
I've been using this Show/Hide plugin for a few years now. It used to be that the code was this [showhide type="post" more_text="Show the spoiler…” less_text=“Hide the spoiler…”]
Text you want to hide
[/showhide]   And I could insert whatever text I wanted within the quote marks. Then Chan broke it. Now it says "Show Press Release" regardless of the text I put in the quote marks. I told Chan about this and the fact that the plugin completely failed the last time I tried using it. Now he's fixed it so it does still show and hide but it keeps the "Show Press Release" text regardless of the text I put in the quote marks. Chan's response: change the CSS code. Really?! So unhelpful! It's going to take some research to figure out how to find his code segment in my CSS code. Why would you take an elegant piece of coding and break it?
35 (az összes) vélemény olvasása

Közreműködők és fejlesztők

“WP-ShowHide” egy nyílt forráskódú szoftver. A bővítményhez a következő személyek járultak hozzá:

Közreműködők

“WP-ShowHide” 1 nyelvre lett lefordítva. Köszönet a fordítóknak az áldozatos munkájukért!

“WP-ShowHide” fordítása a saját nyelvünkre.

Érdekeltek vagyunk a fejlesztésben?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Változási napló

Version 1.04

  • NEW: Added aria-hidden and aria-expanded to elements

Version 1.03

  • NEW: Added .sh-link and .sh-content as a standard class name on top of the type specific class name.
  • NEW: Added do_shortcode() to allow shortcode to be parsed within ShowHide

Version 1.02

  • FIXED: Some theme uses .hide as display: none and hence I have changed .show to .sh-show and .hide to .sh-hide to advoid conflicts.

Version 1.01

  • NEW: Added additional show or hide class to the link and content depending on the visiblity of the content to allow more precise CSS styling.

Version 1.00 (01-05-2011)

  • FIXED: Initial Release