Multiple loop question

  • Unknown's avatar

    Basically, I’m trying to work with creating category pages on my website. I would like for each category to start with a certain post that is formatted differently. I have an include statement in my archive.php statement that adds IF/ELSEIF statements for each category. I would like to then have some code in each of these that queries the post that I’ve created for the category heading.

    This works well for querying the heading post that I need, but after this, it lists the heading post again when it should be displaying all of the posts that are in the category.

    query_posts(‘p=1245’);
    while (have_posts()) :
    the_post();
    the_content();
    endwhile;

    I tried adding rewind_posts(); after the endwhile thinking that it might need to reset, but that didn’t seem to work.
    Thanks for your help.

  • Unknown's avatar

    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

  • The topic ‘Multiple loop question’ is closed to new replies.