First thing you need to do is install and activate the WP ShowHide plugin. The plugin works out of the box and there are no options for you to configure. To hide the text in posts using the toggle effect, you need to use the shortcode like this:
[showhide type="post"]Text you want to hide[/showhide] Upon first usage of the shortcode you will notice that it shows the toggle link with the text “Show Press Release (xx more words)”. Actually the plugin was written specifically for a site that published press releases. However this text can be easily changed to whatever you like. Use the shortcode like this:
[showhide type="post" more_text="Show more..." less_text="Show less..."]
Text you want to hide
[/showhide] The showhide shortcode comes with some parameters that you can use to gain control on how it works in your individual posts. The default parameters and the values for the shortcode are these:
[showhide type="pressrelease" more_text="Show Press Release (%s More Words)" less_text="Hide Press Release (%s Less Words)" hidden="yes"] We hope that you found this article helpful in adding the toggle effect to hide text in your WordPress posts and pages. Let us know would you rather use toggle effect to hide full posts or use default WordPress excerpt functionality?
Source: WPBeginner