How to Dynamic bootstrap carousel bullets in wordpress
Md Abul Bashar | 4,862 views | March 13, 2016 | Tips And Tricks | No | 7:37 AM |
Hi, Today I will teach you, how to dynamic bootstrap carousel bullets in WordPress website or themes, just you will query your posttype, WordPress default post or your custom post, and you can see below query codes then you can understand, just add extra dynamic counting functions in your query then it’s working.
You can see below code
<?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); ?> <!--Content Area--> <li data-target="#myCarousel" data-slide-to="<?php echo $number++; ?>"></li> <!--Content Area--> <?php endforeach; ?>
Just you can change your code example: posttype, content area etc…
Thanks for read this article.
You have to enjoy this articel? Don't forget subscribes this site.
If you want to get our update article, then please subscribe this site.
This title last post
4,862 views | March 13, 2016 | 7:37 AM