• Resolved ScottCodes

    (@scottlush)


    Hi,

    Thanks for the very useful plugin.

    In one of our blocks we notice that Content Blocks seems to insert <p></p> tags before and after an tag. The <p> tags are not in our block. It is added somewhere by Content Blocks or WordPress.

    This throws off the styling of that block.

    Is there a way to disable this, or to work around?

    To see the issue, compare these 2 pages please. They have the same html snippet:

    1. HTML is directly on the page (no Content Block). Renders correctly.
    https://www.forceofnatureclean.com/test-inline-content/

    2. HTML is in a Content Block. Unwanted <p> tags added before and after
    https://www.forceofnatureclean.com/test-content-block/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Johan van der Wijk

    (@vanderwijk)

    Hi Scott, this is very strange… Could you please switch to code view while editing the content block to see if there is no space before the image tag?

    You can also try adding this to your shortcode: suppress_content_filters=yes

    These are all the available shortcode options with their default values:

    'id' => '',
    'slug' => '',
    'class' => 'content_block',
    'suppress_content_filters' => 'no',
    'featured_image' => 'no',
    'featured_image_size' => 'medium',
    'title' => 'no',
    'title_tag' => 'h3',
    'markup' => 'div'
    Thread Starter ScottCodes

    (@scottlush)

    Thanks, your first tip worked: I switched from ‘Text’ view to ‘Visual’ and then back to ‘Text’. At that point there were a series of &nbsp in the Text view. I deleted them. Now the html renders as expected:
    https://www.forceofnatureclean.com/test-content-block/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content Blocks seems to add tags before and after an image’ is closed to new replies.