user2202136
user2202136

Reputation: 39

Wordpress shortcodes and insert tags p and br

I have problem using wordpress in the shortcodes, I use return to show values but the problem continues, the shortcode shows ok, but the are <p> and <br> tags in it.

The content of thext into my template :

<div class="content">

[shortcode_poll="1"]

</div>

I tried all, and the problem persists. I used one plugin to remove this lines but it does not work.

I also tried

 remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );

If you know how fix this please tell me how ?

Upvotes: 0

Views: 669

Answers (1)

mauteri
mauteri

Reputation: 531

Lowering the priority of wpautop fixes this (or it did for me at least). Add this to functions.php in your theme.

remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop', 12 ); 

Upvotes: 1

Related Questions