Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
// this is sometimes needed when working in certain themes,
// you'll know it's needed when you get an error such as "Call to a member function on a non-object"
global $cm_links;
// I've set the class to not require the use of this function, but it certain situations it should be used
$cm_links->the_meta();
// uncomment the below and see if you get any output
//print_r($cm_links->the_value('links'));
?>
<div class="links">
<?php if ($cm_links->have_fields('links')): ?>
<h2>Artist Links</h2>
<?php while($cm_links->have_fields('links')) : ?>
<a href="<?php $cm_links->the_value('url'); ?>" target="_blank"><?php $cm_links->the_value('title'); ?></a>
<?php endwhile; ?>
<?php endif; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.