Support » Fixing WordPress » multiple loops help

  • hi ppl,

    i am trying to modify my basic loop and want small help. whoever helps me out, thx in advance .

    i want to modify my loop as follows

      i dont want to show my asides category on my front page. then
      i want to show only title for the last 5 posts out of 6 displayed.

    i am trying to use the following code.

    <?php $my_query = new WP_Query('showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;?>
    <!-- Do stuff... -->
    <?php endwhile; ?>
    <!-- Do other stuff... -->
    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    <!-- Do stuff... -->
    <?php endwhile; endif; ?>

    now this code is doing the point no-2. that is display the 6 posts with only titles for the last 5 posts

    but i dont understand how to make the category asides not comming up in the front page. this code displays the asides as well. can any one help me plss..

  • The topic ‘multiple loops help’ is closed to new replies.