Created
January 18, 2015 19:04
-
-
Save shahadat014/9298c6a91d588f562f15 to your computer and use it in GitHub Desktop.
Dynamic bootstrap carousel bullets
This file contains hidden or 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
This code does not work.