admin管理员组文章数量:1414628
When creating a new blog post, and the first item is a link follewed by text like this:
<a>Some link</a> some text
When this is rendered into HTML The
tags get placed at the end of the text like this:
<a>Some link</a> some text<p></p>
If there is any text before the link at the beginning then
tags are wrapped correctly.
I have gone into wp-includes/formatting.php and am not able to find source of this problem...
Any insight or suggestions would be greatly appreciated. Thanks.
When creating a new blog post, and the first item is a link follewed by text like this:
<a>Some link</a> some text
When this is rendered into HTML The
tags get placed at the end of the text like this:
<a>Some link</a> some text<p></p>
If there is any text before the link at the beginning then
tags are wrapped correctly.
I have gone into wp-includes/formatting.php and am not able to find source of this problem...
Any insight or suggestions would be greatly appreciated. Thanks.
Share Improve this question asked Sep 12, 2019 at 9:31 JoshJosh 32 bronze badges1 Answer
Reset to default 1May this will helpful for you
1) There will be no p tag will wrap while starting with anchor tag. The editor will takes a each paragraph in a paragraph tag.(Whether it may any tag, the editor will all the html content inside of p tag)
2) If you are using wordpress default post editor means just print it by using the_content() or get_the_content($post_id) .
3) If you are using Custom Field (ACF) means use apply_filters().
<?php echo apply_filters('the_content', 'your_field_name');?>
本文标签:
版权声明:本文标题:When creating a blog post through the WYSIWYG editor, text is not being wrapped in <p> tags correctly when startin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745164625a2645612.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论