-
-
Save koohz/f440a9a598baa3c5b76c425330f49c1f to your computer and use it in GitHub Desktop.
WP Custom repeatable metabox
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 | |
echo '<ul class="iv-slider">'; | |
$sliders = get_post_meta( get_the_id(), 'gp', false ); | |
foreach ( $sliders as $slider ) { | |
echo '<li class="iv-slide">'; | |
echo '<h3>'.$slider["iv-slider-title"].'</h3>'; | |
echo '<p>'.$slider["iv-slider-desc"].'</p>'; | |
echo wp_get_attachment_image(array_shift($slider["iv-slider-img"])); | |
echo '</li>'; | |
} | |
echo '</ul>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment