How to Show and Hide Text in WordPress Posts – If you want to create a page that contains many questions and answers such as FAQ page so to make users feel comfortable and easy to navigate the contents of the content, you should display a list of questions and answers that look concise, so that when the page is first opened by your visitors, it does not appear in its entirety and makes it difficult for users to find which question they want.
You can make the content look simple and concise by using the Toggle Effect, so the answer content will only appear when the visitor clicks on the selected question, and when it is clicked again, the answer content will be hidden again. You can see an example like the one in the image below.
To make text hidden and displayed by clicking like the image above, you can use the help of the WP Showhide plugin. Please refer to the explanation below for how to use the WP Showhide plugin so you can show and hide text in WordPress posts or pages.
How to Show and Hide Text in WordPress with WP-Showhide
The first thing you need to do is install and activate the plugin WP showhide. This plugin is very easy to use because there are no settings or no configuration required, so you only need to activate it and the plugin is ready to use. And next to hide the text in the post using the toggle effect, you need to use a shortcode like this:
[showhide type="post"]Taruh tulisan yang ingin disembunyikan disini[/showhide]
By default the plugin will display the words “Show more ..” and “Show less ..” as a navigation to show and hide content. But, you can easily change the text to your liking, please add the shortcode code as below:
[showhide type="post" more_text="Show more..." less_text="Show less..."] Taruh tulisan yang ingin disembunyikan disini [/showhide]
The WP showhide shortcode comes with several parameters you can use to gain control over how it works in individual posts. Here are some of the default parameters and values for the shortcode from WP Showhide:
[showhide type="pressrelease" more_text="Show Press Release (%s More Words)" less_text="Hide Press Release (%s Less Words)" hidden="yes"]
And that’s a brief explanation of how to use the WP Showhide plugin which functions to show and hide text in WordPress content with a toggle effect. Hopefully this article was useful for you and good luck. 🙂