I have a WYSIWYG editor on user profiles (user_bio), and on the author.php there are missing paragraph tags when I try to echo out the field.
When I add other HTML through the editor (h2, h3, ul>li, etc) it all works, only the paragraph tags seem to be missing.
Example Code:
<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
echo $curauth->user_bio;
?>
I have having the same problem. Any solution?
Do you get expected output if you use wpautop?
echo wpautop($curauth->user_bio);
It’s one of the functions that gets run on the ‘the_content’ filter, you can also do:
echo apply_filters('the_content', $curauth->user_bio);
Which will sort out shortcodes and other things.
I don’t think has anything to do with ACF, but I’m playing around with custom user fields at the moment so I’ll follow up if I find anything.