How To Show And Hide Text In WordPress Using Toggle Effect

show and hide text

To give a compact look to your post/page you may want to show and hide text in WordPress using toggle effect. Which will allow users to click and see more information if they want to. This show and hide toggle effect is very much handy for the FAQ page. Where you see a bunch of questions and you only click on the specific question to expand it and see its answer. 

In this post, I will show you how to show and hide text in WordPress pages and posts with toggle effect. Let’s start then. 

How To Show And Hide Text In WordPress Using Toggle Effect

At the beginning install and activate WP-ShowHide plugin. Now you might think of configuring the plugin, but surprisingly there is no need to do configuration. To hide text in WordPress you have to use a shortcode like this:

[showhide type="post"]Text you want to hide[/showhide]

You can use this shortcode by directly writing in your post or you can see How To Add A Shortcode In WordPress (Quick Guide) to know more.  

Upon using the above shortcode you will see the text “Show Press Release”. This plugin was actually written specifically for a site that publishes press releases. However, you can change the text in whatever you want using a shortcode like this:

[showhide type="post" more_text="Show more..." less_text="Show less..."]
Text you want to hide
[/showhide]

This showhide shortcode comes with some parameters that you can use to gain control on how it works on individual posts. On the first parameter type is declared, on the ‘more_text’ parameter write the text that you want to show your visitor before toggling, and on the ‘less_text’ parameter write the text that you want to show your visitor after toggling. 

Then you write the text that you want to hide. At the finish line, you use the closing syntax. 

The default parameters and values for the shortcodes are:

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

Last Words

Isn’t the whole process is easy? There are other plugins that will allow you to show and hide text in WordPress using toggling, but here I have described the easiest one. If you still couldn’t use this procedure, ask for help in the comment. I will be glad to do it. 

If you liked the post don’t forget to share it with your friends and let me know your thoughts 

Leave a Comment

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap