i have a trouble. I tried to use too many plugins and funciont and also

remove_filter( 'the_content', 'wpautop' );

but it is not working.

I've added a shortcode into a text widget but wordpress add always tags p.


  • Does the shortcode itself add a P tag?
    – Christine Cooper
    Mar 14, 2014 at 19:21
  • i don't know... inside the html file there is no tags <p> i have always tags <p> and i don't know why. I am becoming crazy today. Mar 14, 2014 at 19:23
  • 1
    Sorry you are confusing me, are you telling me that when you view the HTML file, there is no P tag? If so, then problem solved?
    – Christine Cooper
    Mar 14, 2014 at 19:25
  • when i see the html file there is the P tag but not in the original template's html file Mar 14, 2014 at 19:26

1 Answer 1


WP's text widget doesn't run text through the_content filter, it applies wpautop() on saved text explicitly in code:

<div class="textwidget"><?php echo !empty( $instance['filter'] ) ? wpautop( $text ) : $text; ?></div>

This is controlled by aptly named "Automatically add paragraphs" setting at the bottom of the widget.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.