Guest User

Untitled

a guest
Jun 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. // this is sometimes needed when working in certain themes,
  3. // you'll know it's needed when you get an error such as "Call to a member function on a non-object"
  4. global $cm_links;
  5.  
  6. // I've set the class to not require the use of this function, but it certain situations it should be used
  7. $cm_links->the_meta();
  8.  
  9. // uncomment the below and see if you get any output
  10. //print_r($cm_links->the_value('links'));
  11. ?>
  12.  
  13. <div class="links">
  14.  
  15. <?php if ($cm_links->have_fields('links')): ?>
  16. <h2>Artist Links</h2>
  17.  
  18. <?php while($cm_links->have_fields('links')) : ?>
  19.  
  20. <a href="<?php $cm_links->the_value('url'); ?>" target="_blank"><?php $cm_links->the_value('title'); ?></a>
  21.  
  22. <?php endwhile; ?>
  23.  
  24. <?php endif; ?>
  25. </div>
Add Comment
Please, Sign In to add comment