0
我想弄清楚禁用4种自定义帖子类型中wpautop的最佳方法。在多个自定义帖子类型中禁用wpautop
我使用的这个片段:
add_filter('the_content', 'wp1_remove_autop_for_posttype', 0);
function wp1_remove_autop_for_posttype($content)
{
'esh' === get_post_type() && remove_filter('the_content', 'wpautop');
return $content;
}
我还需要将其删除名为菜单,运,外部自定义文章类型。我只是复制并粘贴这个并更改函数名称或有更清晰的方法来做到这一点?
智慧赏识!谢谢!