I’m collecting data via a form plugin and saving that data in form of a post with several custom fields. I then display the content of the post and the custom fields on my post template using…
if( get_post_meta( $post->ID, '_aboutus', true ) ) :
echo '<div class="companyaboutus">' . get_post_meta($post->ID, '_aboutus', true) . '</div>';
endif;
The form field for the “About Us” text is a textarea and most contributors add several lines of text into the field. Displaying the content/text via the code above doesn’t show any line breaks though – any idea how to preserve the line breaks?