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

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?
21 noiembrie 2018
I can see non-developers struggling with this, but if you can ignore the crappy grammar (less words? really? It's FEWER WORDS if you want to be correct in the English language) it works well. It would be nice to have some actual examples and code examples that didn't parse incorrectly, but given that this is free it's hard to expect much from the author.
Citește toate cele 31 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