Post navigation

Beginner’s Guide to WordPress – Show / Hide Text using Peekaboo

So we’ve log-in, looked around the dashboard, started posting, and added some pictures. Now onto something completely different. You want to blog about a case but want to include some questions for the reader, how can you hide part of your post ?

I’m no WordPress expert, in fact I’ve been using WordPress for less than a year, and I’m sure there are several ways to achieve the goal we’ve set for ourselves here, but this post will focus on using the Peekaboo plug-in to show/hide portions of post text. I am in no way affiliated with the Peekaboo author, I just find the plug-in easy to use and we’ve used it in a number of posts on this site.

So what does this plug-in let us do ? Let’s have a look at a post from this site on Causes of Shock. When you open the post it looks like this:

But if you click on any of the shock causes, blue text, it opens up to reveal some additional information.

To get Peekaboo to work you have to add some code into your post, just type it in the normal post box, and it looks like this:

The text between the link name [] can be anything you want, in the example above it’s ‘Click here to show answer’. You can have multiple show / hides in one post you just have to change the link name, the bit in ” ” for each one, see the example below.

For the CHOD post here is what the code looks like when entered

VN:F [1.9.22_1171]

Rate this post

please wait...

Rating: 4.5/5 (4 votes cast)

Beginner’s Guide to WordPress – Show / Hide Text using Peekaboo, 4.5 out of 5 based on 4 ratings

Glad it’s been helpful. I’m sure there are a great many ways of implementing show/hide text function but Peekaboo works for me.
I cheat and keep the code in a text file so I can easily copy it into posts, it saves me having to go back to the Peekaboo settings tab and reading it every time !