duannai5858 2015-02-03 09:21
浏览 41
已采纳

换行没有使用Wordpress TinyMCE Advanced

I have a word document, with all my posts already write on it. So I just have to copy/paste all these posts on my tinyMCE advanced Editor in my Wordpress 4.1

The only problem is that it doesn't take care about line break when I echo them in my blog page.. Whereas I can see these line break on tinyMCE visual preview. And if I check in the tinyMCE text mode, I don't see any <br /> or any <p> tags.

Does anyone had this problem ?

I have created my own template. And it is my first time on Wordpress so I could have miss something, but everyone seems to have a problem with remove_filter ('the_content', 'wpautop'); in their function.php But I don't have this function and I try with add_filter ('the_content', 'wpautop'); but it doesn't change anything.

Thank you in advance!

  • 写回答

1条回答 默认 最新

  • dongyuan7110 2015-02-03 10:27
    关注

    In your themes template where you output the_content try this:

    $getPost = get_the_content();
    $postformatted = wpautop( $getPost );
    echo $postformatted;
    

    You may want to remove the filter you added if it does not initially work.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭