I have created a new plugin, WP-ShowHide [1]. It is a simple plugin (83 lines of codes including comments) with no configuration screen needed.
This new plugin came about when Hisham [2] tweeted me about whether there is a “Show/Hide Press Release” WordPress plugin like what Engadget [3] does when posting a Press Release [4].
I can’t seem to find it and decided to code one myself using WordPress ShortCode API [5]. I made the plugin more generic rather than focusing on Press Releases, so you can have multiple Show/Hide content within a post.
I tested it on WordPress 3.1.1 but technically it should work with any version higher than WordPress 2.5 because ShortCode was introduced in WordPress 2.5.
WP-ShowHide Description
Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the cotent via a link. 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 ](Remove the spaces before and after the square brackets [].)
Download: WP-ShowHide 1.00 [6]
Documentation: WP-ShowHide [7]
Demostration/Example Usage
Remove the spaces before and after the square brackets [].
Tag: [ showhide ][ /showhide ]
lesterchan.net is the blog and portfolio site of Lester Chan who is also the author of many popular WordPress plugins like WP-Polls and WP-PageNavi.
For the blog section, it is updated on a regular basis from topics ranging from gadgets to technology and even current affairs in Singapore
For the portfolio section, it features the resume as well as the WordPress plugins page.
lesterchan.net showcase how extensible WordPress can be in terms of themes and plugins.
For themes, the sidebar can be switch to either the left or right side and the preference will be save into the browser cookie so that in future visit, it will display the menu on your prefered side.
For plugins, there is the gallery page over at https://lesterchan.net/gallery/ which implements basic gallery features such as category and pagination.
Tag: [ showhide type="links" more_text="Show Links (%s More Words)" less_text="Hide Links (%s More Words)" ][ /showhide ]
Official Links: lesterchan.net [8]
Official Links #1: lesterchan.net [8]
Official Links #2: lesterchan.net [8]
Tag: [ showhide type="visibility" hidden="no" more_text="Show Visibility Content (%s More Words)" less_text="Hide Visibility Content (%s More Words)" ][ /showhide ]
The visibility of this content is set to display by default instead of hidden.