Jump to content


This topic is now archived and is closed to further replies.


[WordPress] Need Help With a Simple Loop!

Recommended Posts

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>';


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!

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.