简体   繁体   English

WordPress未登录时删除p标签

[英]Wordpress removing p tags when not logged in

I have been struggling to understand why my text was changing size on a daily basis and have come to realise that wordpress is stripping the P tags out of the pages every time the_content() is used. 我一直在努力理解为什么我的文本每天都会改变大小,并且逐渐意识到,每次使用the_content()时,wordpress都会从页面中剥离P标签。

When I am logged in to wordpress and view the site everything is perfectly fine and the P tags appear which makes my fonts much nicer. 当我登录到wordpress并查看该站点时,一切都很好,并且显示了P标签,这使我的字体更加美观。 However when logged out of wordpress all P tags are stripped. 但是,从wordpress注销时,所有P标签都会被剥离。 the_content() is not within any conditional statements it is completely alone in the code so I can't understand why this behaviour would happen. the_content()不在任何条件语句之内,它在代码中完全是单独的,因此我无法理解为什么会发生这种行为。

If anyone has an any idea on this it would be appreciated. 如果有人对此有任何想法,将不胜感激。

Thanks 谢谢

Use this useful Pluggin 使用这个有用的插件

After Installation: 安装后:
Settings > TinyMCE Advanced > check the Stop removing the P tag ..... 设置> TinyMCE Advanced> check停止删除P标签.....

Now, WordPress will not remove any paragraph tag.Hope this will help you 现在,WordPress不会删除任何段落标签,希望这对您有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM