摆脱特定页面上的wordpress编辑器自动标记

时间:2015-01-10 14:22:37

标签: php wordpress-plugin wordpress codex

我有一个问题,当我向wordpress编辑器添加一些代码时,它会自动添加一些HTML,例如span<br/><p>它还会移除我的<div>标记或删除它的类是有任何插件或钩子,我可以在特定的帖子或页面上实现,我没有找到任何解决方案,在我的网站上实现休息。 就像这里是我想在wordpress编辑器中添加的代码。

<div class="home_book">
  <a href="#">
    <img src="http://mydomain/wp-content/uploads/2015/01/someimage.png" alt="" class="center-block" />
  </a>
  <p>6th grade Valerie Marzden’s school year is pretty normal. But real life problems turn this clever girl into a biz-whiz kid overnight. Can she pull her family and friends out of impending disaster?</p>
 <a class="btn btn-default btn-md custom_color_btn text-center" href="#" role="button">Order Now</a>
</div>

1 个答案:

答案 0 :(得分:0)

以下是使用wordpress插件https://wordpress.org/plugins/raw-html/的解决方案,只需使用短代码[raw] Your HTML code [/raw]