Skip Navigation

[Résolu] Paragraphs are automatically inserted and breaking my views code

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 6 années et 8 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Marqué : ,

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Adrian Il y a 6 années et 8 mois.

Assisté par: Shane.

Auteur
Publications
#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

Les langues: Anglais (English )

Fuseau horaire: 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