admin管理员组文章数量:1130349
i wonder if anyone else has had this problem and knows how to fix it.
After importing all posts from my old wordpress installation, using the default xml import tool, all double line breaks have been replaced with single line breaks
this has severely disrupted the formatting of the text in my posts, as normally wordpress interprets a double line break as a paragraph, but after importing, the text looks very squashed together as the single line breaks are interpreted as <br>
does anyone know of a way to fix this issue?
i wonder if anyone else has had this problem and knows how to fix it.
After importing all posts from my old wordpress installation, using the default xml import tool, all double line breaks have been replaced with single line breaks
this has severely disrupted the formatting of the text in my posts, as normally wordpress interprets a double line break as a paragraph, but after importing, the text looks very squashed together as the single line breaks are interpreted as <br>
does anyone know of a way to fix this issue?
Share Improve this question asked Jun 8, 2018 at 1:41 user280109user280109 1012 bronze badges1 Answer
Reset to default 1Add this to your functions.php before exporting It will run the content through same wpautop() function that's used to display posts.
function codelight_content_export($content) {
return wpautop($content);
}
add_filter('the_content_export', 'codelight_content_export', 999);
i wonder if anyone else has had this problem and knows how to fix it.
After importing all posts from my old wordpress installation, using the default xml import tool, all double line breaks have been replaced with single line breaks
this has severely disrupted the formatting of the text in my posts, as normally wordpress interprets a double line break as a paragraph, but after importing, the text looks very squashed together as the single line breaks are interpreted as <br>
does anyone know of a way to fix this issue?
i wonder if anyone else has had this problem and knows how to fix it.
After importing all posts from my old wordpress installation, using the default xml import tool, all double line breaks have been replaced with single line breaks
this has severely disrupted the formatting of the text in my posts, as normally wordpress interprets a double line break as a paragraph, but after importing, the text looks very squashed together as the single line breaks are interpreted as <br>
does anyone know of a way to fix this issue?
Share Improve this question asked Jun 8, 2018 at 1:41 user280109user280109 1012 bronze badges1 Answer
Reset to default 1Add this to your functions.php before exporting It will run the content through same wpautop() function that's used to display posts.
function codelight_content_export($content) {
return wpautop($content);
}
add_filter('the_content_export', 'codelight_content_export', 999);
版权声明:本文标题:import - After imorting posts from another blog double line breaks have been replaced with single line breaks 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749021689a2304473.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论