Show/Hide Shortcode

By Lars Wallenborn

★ 5.0/5 (3 ratings)200+ active installationsVersion 1.0.1

Small and efficient plugin implementing dynamic "Show more..." links. Just use the [showhide] shortcode, there is no addition to the backend.

Description

This plugin allows you to easily add “Show more…” links to your site. Just enclose the content to be hidden between [showhide] and [/showhide]. There is no modification to the backend or fancy editor. Hence the code for this plugin is minimal and the plugin should be easy to review for security issues as well not impact performance.

FAQ

Where do I need to click?

Use the block editor to add two blocks: [showhide] and [/showhide]. Everything in between will be hidden and a link “Show more…” is displayed. When clicked, the hidden content is revealed.

Can I change the default “Show more…” text?

Yes, the [showhide] shortcode accepts the argument show_caption:
[showhide show_caption="Do you want to know more?"]Your Content[/showhide]```
Similarly, use the
hide_caption` attribute to change the “Show less…” default caption.

Screenshots

Changelog

1.0.1

  • Updated “Tested up to” field to reflect current
  • Addresses XSS vulnerability in show_caption and hide_caption arguments

1.0.0

  • Initial Release