Grow your CSS skills. Land your dream job.

Found an error on your WordPress lynda tutorial

  • # February 6, 2011 at 5:18 am

    Chris,
    Just watched the “Creating the blog home page” on lynda.com and you mention to use query post to display the latest 5 blog posts. However, if I have 6 post and hit the “older entries” link, the lastest 5 show up again and NOT the 6th one.

    In other words, pagination doesn’t work with query post. Is there a fix for this? I am wrong? I’m googling now, but thought you might want to know.

    # February 6, 2011 at 5:37 am

    Check out this podcast. Chris covers basic pagination here.

    # February 6, 2011 at 6:13 am

    Thanks. I was having a hard time working with offset. It wasn’t really working for me. I found this great though!

    Here is my solution btw:


    < ?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("posts_per_page=3&paged=$paged"); ?>

    < ?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".