Support » Plugin: Content Blocks (Custom Post Widget) » Paragraph tags stripped from page when shortcode is added

  • Resolved GermanKiwi


    Hi Johan, I’ve added a content block to one of my pages by putting the block’s shortcode onto the page. The page already has a couple of paragraphs of text at the top, and then the shortcode underneath. The content block itself contains several paragraphs of text.

    For some reason, when the shortcode is added to the page, it results in the page’s own paragraphs of text being stripped of their <p> tags – ie. the text at the top of the page itself is no longer inserted into <p> tags, which means the paragraphs flow together as a single paragraph on the page.

    Strangely, the content block’s own paragraphs of text do remain as proper paragraphs though. Only the text outside of the content block (ie. the text that was added directly to the page itself) is stripped of its <p> tags. I have no idea why.

    Can you check this out for me? Maybe it’s a bug? I can share an example webpage with you if necessary (preferably offline as I don’t want to paste live URLs here).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Johan, any chance of an update on this? I’d love to know if you can replicate this and hopefully fix it! 🙂

    Plugin Author Johan van der Wijk


    Hi GermanKiwi, have you checked the ‘Do not apply content filters’ in the widget? This disables the default formatting tags that WordPress normally adds.

    I’m adding the content block via its shortcode, not via a widget, so there is no option for “do not apply content filters” in this case – right? 🙂

    In any case, I thought the option for “Do not apply content filters” only applied to the contents of the block itself, and not to the page which the block is on?

    In the situation I have here, I have a regular page with some paragraphs of text on the page, and underneath that text is the shortcode for the content block. So the content block’s text appears underneath the text that is directly on the page itself. And only the text that is directly on the page itself has been stripped of its paragraph tags. The text from the content block is perfectly fine – it contains all paragraph tags. I hope that makes sense, but let me know if you need a working example, in case you can’t replicate it. (Best to give me your email address or a contact form so I can send you a URL offline).

    Plugin Author Johan van der Wijk


    Sorry for the delay, I finally found some time to look into this but I could not replicate the issue. Is this still a problem for you? If it is, you can send me the url via the contact form on this page:

    Well, I just updated to version 2.4.3 of your plugin today (I was still on 2.3.4 before), and now the problem has resolved itself! All of the <p> tags are now being inserted into the page’s own text above the content block shortcode, as they should be.

    So I guess somewhere between 2.3.4 and 2.4.3 the issue got fixed somehow. Thanks! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Paragraph tags stripped from page when shortcode is added’ is closed to new replies.