Created
March 1, 2018 07:02
-
-
Save zakirsajib/87918d1a23199beafe1d677c87e91a8c to your computer and use it in GitHub Desktop.
Remove p tag and then Add " "
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
add_filter( 'the_content', 'wti_remove_autop_for_testimonial', 0 ); | |
function wti_remove_autop_for_testimonial( $content ) | |
{ | |
global $post; | |
if ( $post->post_type == 'post' ){ | |
remove_filter('the_content', 'wpautop'); | |
$content = “ . $content. ”; | |
} | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment