Skip to content

Instantly share code, notes, and snippets.

@onestepcreative
Created June 23, 2012 04:47
Show Gist options
  • Select an option

  • Save onestepcreative/2976898 to your computer and use it in GitHub Desktop.

Select an option

Save onestepcreative/2976898 to your computer and use it in GitHub Desktop.
for ($i = 1; $i < 5; $i++) {
$content = get_post_meta($post->ID, 'video_card'.$i, true);
$max = // Number of videos that were returned.
echo '<li>';
if ($content) {
echo $content;
echo '<p> ' . $i . ' of ' . $max . ' Video(s)</p>';
} else {
echo '<p>There are no more videos in this series</p>';
}
echo '</li>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment