How to Use Widgets: Spoilers, Accordions

Problem Your post is soooo long and you have to scroll waaaay down to get to the comments?  What’s a lazy person to do?
Solution Hide the bulk of your post until you or someone else is ready to read it.  A widget for doing this is called a spoiler.  A spoiler can be inserted into your post easily using what we call shortcode:

[Opening tag] Your text goes here [/Closing tag]

1. What does a spoiler look like?   

This is a plain spoiler. Click the + sign to see the answer.
I’m glad you asked, and now you know.

2. How do I insert a spoiler?
(The four spoilers below are ‘grouped together’ to form an accordion, so you’re also going to learn how an accordion works.)

Step 1 (this is a fancy spoiler)
It’s extremely easy!  Just select/highlight the text you wish to hide…
Step 2
Click on the Insert Shortcode button above the editor toolbar…
Step 3
Select Spoiler (the fourth item).
Step 4
And insert it into your post.  Voila!

3.  Did you notice how the accordion worked?  If not, step through all four steps again.  What did you notice?

In an accordion, only one spoiler is open at a time.  If one opens, the others close, like an accordion.  This saves space and minimizes text clutter and distractions.

4. So how does one create an accordion widget?

Step 1
Create several spoilers in succession.
Step 2
Then highlight them all and select Insert Shortcode > Accordion (the fifth item).
Step 3
The accordion widget will simply put some accordion open/close tags around all the spoiler widgets to frame them and make them behave, much like a sheepdog keeps a herd of sheep together.

5. What if I want my spoilers to stay open after I read them?

Step 1
Simplicity itself.
Step 2
Just use several spoilers in succession.
Step 3
But do NOT use an accordion to enclose them.







    1. WordPress is very easy to use and very powerful.  Free (and paid) plugins can add tremendous capabilities to your website.

      Grammar tip

      I am also considering using to use WordPress if I ever write my personal blog.

      (“to consider” must take a gerund.  It cannot take an infinite. Just a quirk of English.)

      You should consider inviting him to dinner.


Leave a Reply