Skip to content

Instantly share code, notes, and snippets.

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 danielbachhuber/428190 to your computer and use it in GitHub Desktop.
Save danielbachhuber/428190 to your computer and use it in GitHub Desktop.
<?php $images = get_post_meta($post->ID, 'image');
if ($images) {
foreach ($images as $image) {
$image = explode('{}', $image);
echo '<div class="image"><img src="/media' . $image[0] . '" />';
if ($image[1]) {
echo '<p class="credit">' . $image[1] . '</p>';
}
echo '</div>';
}
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment