I am using wordpress get post meta to store the value of a custom field into a variable. In this particular instance, It is actually grabbing the post's parent's custom field due to the $post->post_parent
Here is the code:
<?php $cast_members = get_post_meta($post->post_parent, 'cast_members', true); ?>
<p><?php echo $cast_members; ?></p>
<?php endif; ?>
The custom field cast_members is a series of cast members, each in its own paragraph. For some reason wordpress is stripping out the paragraph tags and displaying all of the cast members in a continuous string. I need to retain those paragraph tags so each cast member is on its own line. Any idea why get_post_meta
strips out tags and how to fix it?