How to do spoiler tags on WordPress

  • Unknown's avatar

    Hi

    When I transfer my Goodreads reviews to WordPress, most of the html seems to work just fine – but not the spoiler coding. Can I use spoiler coding on WordPress or do I have to get more creative with my reviews.

    On Goodreads it is < spoiler> My text < /spoiler> but without the gap before spoiler or /

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    If I am understanding correctly, you are wanting to add code that shows that the following hidden content contains spoilers? If so, then the more tag would be a great way to do this:

    More Block

    You can even customize the text:

    More Block

    Let em know if you have any questions.

    Thanks,

  • Unknown's avatar

    Thank you Darnell that does sound like what I am looking for.

    I’ll have a play with this before marking as resolved. :)

  • Hi there,

    Just to be clear, the more tag is used to hide your entire post behind a Read More link. On the site front page only the text before the tag will appear, but once you click it, or if you go directly to the post link, the entire post will be visible.

    If instead you want to hide content inside a post, so you have to click the word “spoiler”, for example, to reveal a specific sentence or paragraph, you need something else.

    In that case you can use some HTML code to hide the text, and you’ll need an HTML block to add it in the editor. Just note this code doesn’t work in the Edge browser.

    https://en.support.wordpress.com/advanced-html/#collapsible-content-accordion-effect

  • Unknown's avatar

    Hi folks,

    The forum topic Invisible text/spoiler text (from June-July 2012) might still be helpful. I found, for example, that the following code, provided there by @justpi, still works:
    <span style="cursor:help;" title="spoiler text here">visible text here</span>

    @justpi
    adds the following description:

    This will give you a popup text when you hover over the visible text. See if you like it. Limitation: in contrast to janicu’s solutions, the popup text can only be plain continuous text (no special formatting or line breaks etc).

  • Unknown's avatar

    See also the forums “spoiler” tag archives page for more topics with that tag.

  • The topic ‘How to do spoiler tags on WordPress’ is closed to new replies.