I’m using the Get Custom Field Values plugin to display custom meta data for my posts throughout my site.
However, it isn’t working completely as it is displaying only the meta data of the most recent post for all the posts, instead of displaying each post’s individual meta data. The code I am using:
$posts = get_posts('numberposts=3');
foreach($posts as $post) :
<?php echo c2c_get_recent_custom('date', '<p class="eventdate">', '
<p class="event"><?php the_title(); ?>
<?php echo c2c_get_recent_custom('location', '', ''); ?>
<?php echo c2c_get_recent_custom('time', '', '
<?php endforeach; ?>
Can anyone see what I am doing wrong and how I could remedy the situation? If it helps at all, the site I am working on is located here.
Thanks in advance.
- The topic ‘Get Custom Fields, display for multiple posts’ is closed to new replies.