So ...

Needless to say, you can easily customize the above default shortcode according to your needs. Let's take a closer look to each parameter ...

Basically, the simple toggle shortcode looks like this ...

[showhide]Text you want to hide[/showhide]

... and we can use three - completely arbitrary - parameters:

The type="" parameter is nothing else but a unique identifier for the given shortcode. Will allow you to have multiple show/hide content toggles within the same post or a page, just by using new, different types for each shortcode. For example, you could use type="question1", type="question2", etc, ...

The more_text="" parameter is the visible, clickable link that will reveal the hidden text. Following my initial FAQ page scenario, it could be the question itself ... For example: more_text="Is Wealthy Affiliate worth it?"

The less_text="" parameter is the clickable link that will hide the text. For example: less_text="Hide the answer"

So if I want to use the above parameters, my shortcode will look like this:

[showhide type="question1" more_text="Is wealthy affiliate worth it?"

less_text="Hide the answer"]YES! Wealthy Affiliate is a one-stop shop for

all types of internet marketing training and tools.[/showhide]

And here are the default and expanded live results ...




And that's it my friends!

If you have any comments, further questions or update requests please don't hesitate to react! Like, comment and share!

And don't forget, you can easily come back to this tutorial whenever you want.

All you need to do is to bookmark the categorized, daily updated register of my blogs and training materials. Here it is:

Posts and training by smartketeer

Thanks for your time!



Join the Discussion
Write something…
Recent messages
Mick18 Premium
Excellent idea. Thanks Zed. Will bookmark.
Reply
smartketeer Premium
Thanks Mickey!
Reply
Ragman1 Premium
Thank you Zed. Very nice.
Reply
smartketeer Premium
Thanks for the time Robert!
Reply
Chrissies Premium
Thats great stuff Z, just what I have been looking for, very many thanks :)
Reply
smartketeer Premium
Thank YOU!
Reply
dowj01 Premium
Excellent, thank you.
Justin
Reply
smartketeer Premium
Thanks for the time Justin!
Reply
ShihTzuSteve Premium
Another really useful lesson. Thank you, Zed.
Reply
smartketeer Premium
Thank YOU!
Reply
Top