I was working on a project and I was having an issue where my paragraph tags were disappearing from my custom field, while using
$meta_values = get_post_meta( $post_id, $key, $single );
After doing a bit of research I realized “get_post_meta” does not have the ability to add in paragraph spacing for a custom post type. This is when I found a crafty piece of code call wpautop“.
How To Use WPAUTOP In-place Of Get Post Meta With PHP
Instead of calling out to your description “Get Post Meta” like so:
$description = get_post_meta($your_field_id, 'description', true); echo ( "
" . $description . "
Replace it with the “WPAUTOP” markup:
Cheers! It is that simple.