LITFL Show/Hide Secret Revealed!

One of the most common questions we get at LITFL is:

How do you do the show/hide feature on LITFL’s question-and-answer posts?

It’s pretty simple, we use the excellent ‘expanding text’ plugin for WordPress created by Dagon Design:

This WordPress plugin allows you to create sections of text in your post or page which expand/collapse when clicked on. You simply wrap the special tags around your text, and set the ‘expand link’ (the link visitors click on to show the text). If your visitors do not have javascript enabled, the ‘expand link’ is not shown, and the text is displayed normally.

The instructions for using the plugin are simple to follow, and can be found right here.

The show/hides can even be nested inside one another, which can make for a pretty complicated post structure — as we discovered when assembling Gerard Fennessy’s mind-boggling Choose Your Own Resus Adventure!

Print Friendly


  1. ER Jedi says

    I’m thinking about switching to wordpress, so forgive me for not knowing this. In order to use plug ins such as this one, you have to self host your blog correct? As I understand it, when you host with wordpress, you don’t have the option to use plugins. Is that correct?

    • says

      If you have your own hosted domain and then self-host WordPress there are a large number of plugins available to assist with blog presentation. We made the switch in 2008.
      As far as free blogs go, then WP and Blogger are very good, but don’t afford the potential to add as much personal flair…
      Happy to chat more if you want to drop me an email