Welcome! To use this support forum, please Login or Join Today!

   

wpautop and WooCommerce

{name}
Rank

Total Posts: 23

Joined 2015-08-06

PM

 

Hi Casey,

I’m using WooCommerce with Mobius. For posts or pages in both the visual and text editor, I’m unable to remove WordPress automatic paragraph tags, even with your ‘wpautop’ custom field set to ‘false’.

I tried overriding it all with the following snippet via functions.php, but still no luck. Any ideas as to how to disable wpautop, especially on WooCommerce pages?

<?php
/*-----------------------------------------------------------------------------------*/
// Go Away WPAUTOP
/*-----------------------------------------------------------------------------------*/

remove_filter'the_content''wpautop' );
remove_filter'the_excerpt''wpautop' );

?> 
{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

I’ve heard of this before. Sometimes it can be another plugin. For some reason, the code below worked by hooking into the_content a higher priority and then adding it back.

Try adding the following to your child theme functions.php:

remove_filter'the_content''wpautop' );
add_filter'the_content''wpautop' 99);
add_filter'the_content''shortcode_unautop',100 );