WordPress plugin intelligence profile

WP-ShowHide

Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the content via a button.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.0
Current version3.0.0
WordPress coverageTested up to WordPress 7.0
Minimum stackWP 6.8 · PHP 8.2
Directory statusactive
Last directory update9 Aug 20262mo ago
Active installations9K+Adoption metric — not a quality score
WordPress.org rating4.2 / 5 from 43 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records WP-ShowHide version 3.0.0 as active, updated 2mo ago and tested up to WordPress 7.0.

Overview

About this plugin

WP-ShowHide hides part of a post behind a button, so something long — a press release, a changelog, a spoiler — does not fill the page until a reader asks for it. The button says how many words it is hiding, which is what Engadget does with their press releases. [/showhide]

There is nothing to configure and no settings screen. Every choice the plugin offers is an attribute of the shortcode that makes it, so two toggles in the same post can behave differently.

Features

  • One shortcode, [showhide], usable any number of times in a post or page
  • A Show/Hide block for the block editor, holding the content it hides as ordinary blocks and rendering exactly what the shortcode renders
  • A button rather than a link, with aria-expanded and aria-controls, so the toggle works from the keyboard and reads correctly to a screen reader
  • Labels that count the words they are hiding
  • No jQuery, and no script at all on a page that uses neither the shortcode nor the block
  • Custom DOM events on every toggle, for themes that want to react to one

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.

Usage

  • By default, content within the showhide shortcode will be hidden.
  • Example: [showhide]Press release content goes in here.[/showhide]

-

Default Values: [showhide type="pressrelease" more_text="Show Press Release (%s More Words)" less_text="Hide Press Release (%s Less Words)" hidden="yes"]

-

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

-

[/showhide]

-

If you want to set the default visibility to display.

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

Block editor

There is a Show/Hide block too, filed under Text in the inserter. It holds the content it hides as ordinary blocks — paragraphs, images, anything — so that content is written and edited in place instead of being typed into a field as markup, and it stays visible while you are editing. The Show/Hide panel in the sidebar carries the same four choices the shortcode attributes carry: the type, the two button labels, and whether it starts hidden.

The shortcode is unchanged and still supported. It is not deprecated, posts that use it need no editing, the block and the shortcode render the same markup, and one post can hold both.

  • 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="wp-showhide sh-link pressrelease-link sh-hide"> <button type="button" class="sh-toggle" aria-expanded="false" aria-controls="pressrelease-content-1" data-sh-more="Show Press Release (4 More Words)" data-sh-less="Hide Press Release (4 Less Words)">Show Press Release (4 More Words)</button> </div> <div id="pressrelease-content-1" class="wp-showhide sh-content pressrelease-content sh-hide" hidden>Content</div>

  • With the example above, here are the following styles you can use in your CSS:

sh-show { }

  • Every toggle fires three events on the.sh-link element, and all three bubble, so one listener on the document covers every toggle on the page: sh-link:more when a toggle opens, sh-link:less when it closes, and sh-link:toggle on both.
WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • press release
  • hide
  • show
  • toggle
  • visibility
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 7.0

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 7.0.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.0
Minimum requirementsWordPress 6.8 · PHP 8.2
Update activity9 Aug 20262mo ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.