Created
May 5, 2013 07:32
-
-
Save jayseventwo/5520031 to your computer and use it in GitHub Desktop.
Remove autop from WordPress pages. Make sure you have “custom fields displaying from screen menu at top of page. Add to functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function disable_autop() { | |
global $post; | |
$disable_autop_var = get_post_meta($post->ID, 'disable_autop', TRUE); | |
if ( !empty( $disable_autop_var ) ) { | |
remove_filter('the_content', 'wpautop'); | |
} | |
} | |
add_action ('loop_start', 'disable_autop'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment