0

I have written a query to display in a jquery slider (nivo) however it appears that it is showing all the posts and not just one at a time

This is my code:

<div class="slider-wrapper theme-projects">
    <div id="slider2" class="nivoSlider">
        <?php $the_query = new WP_Query( 'showposts=2' ); ?>
            <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
                <?php the_title(); ?> 
       <?php endwhile;?>
     </div>
</div>

Can anyone advise? The website address is http://www.gordonlundie.com/Howe/

thanks

EDIT ok i found a previous post where i was having a same issue yet its still doing the same :S

<div id="recentprojects1">      
     <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('recentprojects1-sidebar') ) :                       endif; ?>
        <div class="slider-wrapper theme-projects">
            <div id="slider2" class="nivoSlider">
                <?php $the_query = new WP_Query( 'showposts=5' ); while ($the_query -> have_posts()) : $the_query -> the_post();?>

                <h3><?php the_title(); ?></h3>
                <?php the_content(); ?>
            </div>
        <?php endwhile;?>
</div>

Guidance on how i have gone wrong, so that i may not make this mistake in the future is greatly received rather than unhelpful comments.

  • This is really a jQuery related question. – Wyck Sep 17 '13 at 19:39
  • @wyck why is this? as it is showing the post title of both posts and not just one as i want in the query to show!? – Kirsty Marks Sep 17 '13 at 19:41
0

It seems you have same images in both post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.