I am trying to disable wpautop
function only on one page. I tried to do this by adding a [wpdisableautop]
shortcode to the page, but it did not work. Shortcode is not displaying as raw text on the page, meaning that Wordpress catches the shortcode but it does not do anything.
What I have done so far:
Added to functions.php:
<?php
include ( WP_CONTENT_DIR .'/themes/vnc2/disableautop.php');
add_shortcode( 'wpdisableautop', 'disableautop' );
?>
And then I have created a disableautop.php file inside /vnc2/ dir:
<?php
function disableautop () {
remove_filter( 'the_content', 'wpautop' );
}
?>
- I do not want to disable it globally in functions.php
- I do not want to use any plugins
What have I done wrong?