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');?>