2013-04-06 117 views
0

我在使用wordpress的短代码时出现问题,我使用返回值来显示值,但问题仍然存在,短代码显示正常,但是其中有<p><br>标签。WordPress的短代码和插入标签p和br

thext的内容到我的模板:

<div class="content"> 

[shortcode_poll="1"] 

</div> 

我尝试了所有,但问题依然存在。我用一个插件来删除这条线,但它不起作用。

我也试过

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

如果你知道如何解决这个问题,请告诉我怎么样?

+0

简码不应该在您的模板中使用,但应该在编辑器中使用它们。 – user2019515 2013-04-09 00:55:25

回答

0

降低wpautop的优先级解决了这个问题(至少对我而言)。将此添加到主题中的functions.php中。

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