Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kearnse

    (@kearnse)

    Ok so I figured it out. Thanks for pointing me in the right direction.

    Here’s the piece of old code that I updated:

    <?php query_posts('category_name=red&showposts=1&offset=1'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php if (in_array($post->ID, $do_not_duplicate)) continue; update_post_caches($posts); ?>
    
    <!-- most recent in red category -->

    Here’s the new code:

    <?php query_posts(array('post__not_in'=>$do_not_duplicate, 'cat'=>3, 'posts_per_page'=>1));
    php while (have_posts()) : the_post(); ?>

    I replaced the loops for each of the three categories with the new code and updated the category for each one. Everything else stayed the same. Success!

    So simple. Thanks again.

    Thread Starter kearnse

    (@kearnse)

    Thanks for the tip.

    I was pretty certain this was the missing link and I’ve played with it a bunch but the light bulb just isn’t coming on. I don’t know where to plug this into my code. Some more hand holding would be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)