Reputation: 39
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
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