• Resolved haguem

    (@haguem)


    Hi all ,

    I’m quite new to wordpress (1yr) and my PHP knowledge is limited at best!

    Basically my problem comes from a bit of php that should be pulling 4 latest blog posts back from wordpress.

    It seems to work fine apart from one post that is from November? The other three are the latest ones…. any help would be greatly received…

    <?php query_posts('showposts=3'); ?>
    				<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    					<div class="blog-post-container<?php if( $count%2 == 0 ) { echo '-1'; }; $count++; ?>">
    						<div class="author-img">
    
                    <?php userphoto_the_author_thumbnail() ?>
    
                </div>
    					<div class="blog-post-info">
    						<div class="blog-post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
    						<div class="blog-post-date"><?php the_time('d F Y'); ?></div>
    					</div>
    						<div class="clear"></div>
    					</div>
    					<?php endwhile; endif; ?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • Try using <?php query_posts('posts_per_page=4'); ?>

    Thread Starter haguem

    (@haguem)

    thanks @esmi…. That seems to work in the same way as <?php query_posts(‘showposts=4’); ?>

    It pulls back 5 posts? The first one being the rouge one from November???

    Strange…

    Is this the only loop in that template file?

    Thread Starter haguem

    (@haguem)

    yes….there is a plugin (slide deck pro)… but its in an array (hope that makes sense)…

    Try deactivating that plugin temporarily and see if that helps.

    Thread Starter haguem

    (@haguem)

    The blog post showing first (always) was a sticky blog post! So I’ve changed that and now the list only shows new blog posts…

    Thanks for your help and sorry if I wasted any of your time esmi

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Recent Blog Posts’ is closed to new replies.