Tag Info

New answers tagged


You need to add your function in the template_redirect hook. You need to first wait for wordpress to finish loading pages before you can add your hook to remove wpautop, otherwise your hook will simply get run over. So your funtion will look like this function pietergoosen_remove_wpautop() { if ( is_page ( 'services' ) ) { remove_filter( 'the_content', ...


Here's what I've found based off this question at Stack Overflow You'll have to remove wpautop entirely then add it back in whenever needed, which I agree in the linked comment, is unfortunate: remove_filter('the_content', 'wpautop'); remove_filter('the_excerpt', 'wpautop'); /** Change How The Content Works **/ function no_content_autop($content){ ...

Top 50 recent answers are included