最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wp autop - How to disable auto-p in WordPress?

programmeradmin4浏览0评论

I need to remove the "wpautop filter" from my WordPress Website because it is adding too many paragraphs. I'm new to WordPress. I don't know how to create Child themes. The name of my theme is the "supreme directory". is it also possible to remove the "wpautop filter" from the supreme directory theme directly?

I need to remove the "wpautop filter" from my WordPress Website because it is adding too many paragraphs. I'm new to WordPress. I don't know how to create Child themes. The name of my theme is the "supreme directory". is it also possible to remove the "wpautop filter" from the supreme directory theme directly?

Share Improve this question edited Jun 2, 2019 at 19:40 Tope Leye asked Jun 2, 2019 at 15:53 Tope LeyeTope Leye 112 bronze badges 1
  • 1 Possible duplicate of Remove Line Breaks From Cell Content in WordPress – Jacob Peattie Commented Jun 3, 2019 at 2:39
Add a comment  | 

1 Answer 1

Reset to default 2

In your child theme's functions.php, try something like this:

remove_filter( 'the_content', 'wp_autop' );

Note that this may have unintended side-effects, and will definitely have an effect on how your content renders.

发布评论

评论列表(0)

  1. 暂无评论