Created
January 5, 2019 09:46
-
-
Save Tsunamijaan/48472a3666ad7e3eed03ea9cd5b9872c to your computer and use it in GitHub Desktop.
Dynamic bootstrap carousel bullets
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 $post; | |
$number = 0; | |
$args = array( 'posts_per_page' => -1, 'post_type'=> 'posttype', 'orderby' => 'menu_order', 'order' => 'ASC' ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<li data-target="#myCarousel" data-slide-to="<?php echo $number++; ?>"></li> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment