• Hi,

    I have a really weird issue at http://whetstoneinc.ca/ website. As you see under the section Whetstone Blog there are 2 posts showing.

    It should show only 1 latest post and the code is :

    <?php query_posts('posts_per_page=1'); ?>
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4> 
    
    <?php the_advanced_excerpt('length=20'); ?>
    
    <?php endwhile; else: ?>
    
    <?php endif; ?>
    
    <?php wp_reset_query(); ?>

    The issue might be caused by the “What’s Wrong With Your CRM?” post, that is set as Sticky.

    The interesting thing is that if I put
    <?php query_posts('posts_per_page=3'); ?>

    It shows 3 posts as it should. It’s only with number 1 that it’s glitching.

    Any ideas how can I fix it?

    Thanks,
    Andrew

Viewing 1 replies (of 1 total)
  • Try adding the option to ignore stickies:

    <?php query_posts('posts_per_page=1&caller_get_posts=1'); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘query_posts issue’ is closed to new replies.