Skip to content

Instantly share code, notes, and snippets.

Created Nov 8, 2010
Embed
What would you like to do?
// This is what I have to output data from a metabox:
<?php $secondaryContentmb = get_post_meta($post->ID,'_secondary_content',TRUE); ?>
<h3><?php echo $secondaryContentmb['title'];?></h3>
<?php echo $secondaryContentmb['description'];?>
// This is what I'm attempting to do but keep getting a fatal error:
<?php if ($secondaryContentmb->have_fields('description')) : ?>
<?php $secondaryContentmb = get_post_meta($post->ID,'_secondary_content',TRUE); ?>
<h3><?php echo $secondaryContentmb['title'];?></h3>
<?php echo $secondaryContentmb['description'];?>
<?php endif; ?>
// I've tried while instead of if but no win.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment