Skip Navigation

[Resolved] Paragraphs are automatically inserted and breaking my views code

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user's texts are being wrapped in auto paragraph tags.

Solution:

There are 2 ways to remove this. The first way is that there is a setting in the content template to disable auto paragraphs.

The second is that there is a [wpv-noautop] shortcode that you can use to remove the paragraph tags.

Example useage

[wpv-noautop]
Test
[/wpv-noautop]

100% of people find this useful.

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Adrian 6 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#629801

I have spent a lot of time working on a view.
After one save, all of a sudden p tags are added everywhere I have an empty line in the views content.

so if I have

[php]
<div class="something">
Link

<h1>Heading</h1>
</div>
[php]

It results in

[php]
<div class="something">
<p></p>
<p>Link</p>
<p></p>
<h1>Heading</h1>
</div>
[php]

being displayed on the frontend. I need to fix this asap please.

Adding

remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

doesn't do anything.

#629809

Update:

A view with

[wpv-noautop]
Test
[/wpv-noautop]

outputs:

<p>Test</p>
#629827

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Adrian,

Thank you for contacting our support forum.

I'm not sure if you already tried disabling the non-toolset plugins but if not please do because sometimes plugins can cause issues like these.

The wpv-noautop should work and remove the p tags but it seems something is interfering.

Please let me know the results of this.

Thanks,
Shane

#629859

Hi Shane,

Thank you for your quick reply
I always do so. Contacting support is my last resort.
I was able to track the issue back to the Blox theme's Custom Code block (very specific issue).

Thank you

Adrian