Skip to content

Instantly share code, notes, and snippets.

@davemac
Created March 7, 2012 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davemac/1991197 to your computer and use it in GitHub Desktop.
Save davemac/1991197 to your computer and use it in GitHub Desktop.
Custom Fields Creator syntax
<?php $inlinecontentblocks = get_post_meta( $post->ID, 'inlinecontentblocks', true );
foreach( $inlinecontentblocks as $inlinecontentblock){ ?>
<div class="inline-thumb">
// here is where I think the below is not right
<?php $inlineImage = get_post_custom_values( $inlinecontentblock['content-block-image'] );
if ( $inlineImage ) { ?>
<img class="alignleft" title="<?php echo $inlinecontentblock['content-block-title']; ?>" src="<?php echo $inlinecontentblock['content-block-image']; ?>" alt="<?php echo $inlinecontentblock['content-block-title']; ?>" width="120" height="115" />
<?php } ?>
</div>
<div class="inline-content">
<h4>
<?php echo $inlinecontentblock['content-block-title']; ?>
</h4>
<?php echo $inlinecontentblock['content-block-text']; ?>
</div>
</div>
<?php }?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment