Reputation: 83
I'm using the Wordpress plugin Advanced Custom Fields to tie data together into a single post.
Here is my query for one of the relationships:
<?php $notes = get_field('episode_notes'); ?>
<?php if(!empty($notes)): ?>
<?php foreach($notes as $note): ?>
<div class="note"><?php echo $note->post_content); ?></div>
<?php endforeach; ?>
<?php endif; ?>
The post_content
is being returned without any paragraph/line breaks (though italics, bold, etc. seem okay). I've tried this without across-the-board success:
<?php echo str_replace('\r','<br>', $note->post_content); ?>
What do I need to do differently?
Upvotes: 0
Views: 106