WP-ShowHide

Beschreibung

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

Entwicklung

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

Übersetzungen

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

Danksagungen

Donations

I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.

Screenshots

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

FAQ

n. a.

Rezensionen

11. November 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. November 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.
Lies alle 30 Rezensionen

Mitwirkende & Entwickler

„WP-ShowHide“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„WP-ShowHide“ wurde in 1 Sprache übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „WP-ShowHide“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

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