-
-
Save kirstenkeister/1713078 to your computer and use it in GitHub Desktop.
WPAlchemy meta definitions for repeating links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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