-1
我使用此代码中的所有页面禁用auto paragraph
和br
:条件语句中的functions.php不工作
remove_filter('the_content', 'wpautop');
remove_filter('the_excerpt', 'wpautop');
后来我决定,我想汽车<p>
和<br />
行为是那样的,在taxonomy => blog-cat
,所以我来了与此代码:
function remove_auto(){
if(!is_tax('blog-cat')){
remove_filter('the_content', 'wpautop');
remove_filter('the_excerpt', 'wpautop');
}
}
add_action('wp_head','remove_auto',0);
但不幸的是,它不工作。
有没有人有想法?
您需要提供更多信息。 – EternalHour 2014-11-03 03:50:49
这对于......有什么作用? – Ohgodwhy 2014-11-03 04:05:34