Jump to content

[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!

Link to comment
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.