joshuag Posted June 29, 2012 Share Posted June 29, 2012 Hey guys, My PHP skills are pretty much nil, but I'm a hardcore code monkey. One of my clients wordpress websites has an image slider with thumbnail navigation underneath. The navigation is only displaying 5 thumbnails even though I've fed the array 6 of them. Can you help me solve to display all 6 thumbnails? Here is where I've fed the array by post id : $featured_posts = new WP_Query(array('post_type' => 'page', 'post__in' => array(2,31,61,75,243,1124), 'orderby' => 'menu_order', 'order' => 'DESC')); Here is the loop that gets the data for the nav. if(!empty($instance['show_slider_nav'])) : $slider_nav .= '<li><a href="#" class="nav-thumb-wrapper">'.genesis_get_image(array('format'=>'html', 'size'=>'Slider Thumbnail', 'attr' => array('class' => 'nav-thumb-image'))).'</a></li>'; endif; The data is then output with a simple : echo '<div id="slider-nav">'; echo '<a class="nav-prev" href="#">Previous</a>'; echo '<a class="nav-next" href="#">Next</a>'; echo '<ul class="nav-thumbs">'; echo $slider_nav; echo '</ul></div>'; Do you need more information? Thank you for your help! Link to comment https://forums.phpfreaks.com/topic/265002-wordpress-need-help-with-a-simple-loop/ Share on other sites More sharing options...
gizmola Posted July 1, 2012 Share Posted July 1, 2012 Sliders are clientside animals. Assuming the slider works fine with 5 images, it is reasonable to assume that the limitation is built into the slider itself. You'd need to look at the client slider code, which I assume is in javascript (although it could also be a flash movie for all we know). Most of these widgets these days are built on top of jquery. I'd suggest you look there first. Link to comment https://forums.phpfreaks.com/topic/265002-wordpress-need-help-with-a-simple-loop/#findComment-1358312 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.