Question : wordpress remove p from content
Answered by : powerful-peacock-svl50mbz6zux
// Prevent WP from adding <p> tags on all post types
function disable_wp_auto_p( $content ) { remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); return $content;
}
add_filter( 'the_content', 'disable_wp_auto_p', 0 );
Source : https://templ.io/blog/prevent-wordpress-from-adding-p-tags-in-content/ | Last Update : Tue, 08 Sep 20