WP-ShowHide

Descriere

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

Dezvoltare

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

Traduceri

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

Recunoștințe

Donații

Mi-am petrecut cea mai mare parte a timpului meu liber pentru crearea, actualizarea, întreținerea și suportul acestor module, dacă îți plac modulele mele și mi-ai oferi câțiva dolari, aș aprecia cu adevărat. De nu, ești liber să-l folosești fără nici o obligație.

Capturi ecran

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

Întrebări frecvente

Nu se aplică

Verificări

22 iunie 2020
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.
8 mai 2020
作者的意思可能是基于经典编辑器的HTML模式来自定义,实际上可以直接修改插件,将A标签替换为button并定制一个class,再全局内添加此class的CSS就可以使其拥有漂亮的按钮样式了。 此方法在古腾堡编辑器下也可以使用。
29 aprilie 2020
Exactly what I was looking for, thanks!
28 aprilie 2020
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
23 februarie 2020
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!
11 noiembrie 2019
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?
Citește toate cele 35 de recenzii

Contributori și dezvoltatori

„WP-ShowHide” este un software open-source. La acest modul au contribuit următoarele persoane.

Contributori

„WP-ShowHide” a fost tradus în 1 locală. Mulțumim traducătorilor pentru contribuția lor.

Tradu „WP-ShowHide” în limba ta.

Te interesează dezvoltarea?

Răsfoiește codul, vezi depozitarul SVN, sau abonează-te la jurnalul de dezvoltare prin RSS.

Istoric modificări

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