Skip to content

Instantly share code, notes, and snippets.

@kirstenkeister
Forked from jdickie/content-person.php
Created January 31, 2012 21:39
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 kirstenkeister/1713078 to your computer and use it in GitHub Desktop.
Save kirstenkeister/1713078 to your computer and use it in GitHub Desktop.
WPAlchemy meta definitions for repeating links
<?php
global $peoplelinks_mb;
$peoplelinks_mb->the_meta();
while($peoplelinks_mb->have_fields('links')) {
?>
<?php
if(is_first()) { ?>
<div id="info-links" class="column left">
<h2 class="column-title">Links</h2>
<ul>
<?php } ?>
<?php // loop a set of field groups
$url = $peoplelinks_mb->get_the_value('url');
$title = $peoplelinks_mb->get_the_value('title');
echo '<li><a href="' . $url . '" target="_blank" rel="nofollow">';
echo $title . '</a></li>';
?>
<?php
if(is_last()) { ?>
</ul>
</div>
<?php }
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment