eristnancy

ACF avec case à cocher

Feb 25th, 2015
205
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if( have_rows('telecharger') ): ?>
  2. <?php echo '<p><strong>T&eacute;l&eacute;charger le vocabulaire :</strong>';?>
  3. <ul>
  4. <?php while( have_rows('telecharger') ): the_row();
  5. // vars
  6. $format = get_sub_field('format');
  7. $lien = get_sub_field('lien');
  8. ?>
  9. <li>
  10. <?php if( $lien ): ?>
  11. <?php echo $format->name . ' : '; ?>
  12. <a href="<?php echo $lien; ?>">
  13. <?php echo $lien; ?>
  14. </a>
  15. <?php endif; ?>
  16. </li>
  17. <?php endwhile; ?>
  18. </ul>
  19. <?php endif; ?>
RAW Paste Data