我一直在试图让wordpress停止在我的内容中添加html标记,而不添加我自己的html标记?
尝试remove_filter( \'the_content\', \'wpautop\' );
和已安装的PS禁用自动格式化,但问题是它也会删除我自己的html标记?
我试图获取\\u content()和\\u content(),但同样的问题也出现了。。。
我不想这样做的方法是让我添加html标记,而不去删除它们。像这样:
<p>Some text here</p>
<p>some more text <span class="fat"> fat </span></p>
SO网友:Mridul Aggarwal
The only way i\'ve ever found (& maybe also the only one that actually works)
Install & activate the plugin TinyMCE Advanced
Go to the plugin\'s settings page & check the box against "Stop removing <p>
& <br>
tags"
Go to your post\'s edit screen, switch between visual & html editor as often as you like & see the difference