如果你不希望 wordpress 主题文章或者页面在输出的时候不自动添加 p 标签,那么你可以使用以下的方法:
第一种是在 single.php 中使用 get_the_content()输出文章内容:
echo get_the_content();
第二种是在 functions.php 中使用
remove_filter( 'the_content', 'wpautop' );
如果你不希望 wordpress 主题文章或者页面在输出的时候不自动添加 p 标签,那么你可以使用以下的方法:
第一种是在 single.php 中使用 get_the_content()输出文章内容:
echo get_the_content();
第二种是在 functions.php 中使用
remove_filter( 'the_content', 'wpautop' );