WordPress.org

Forums

Listing entries minus a category (6 posts)

  1. jeremytai
    Member
    Posted 9 years ago #

    I would like to list the lastest 10 entries on my index minus a specific category. Is this possible and if so could you he me with the tag?

    Thanks in advance.

  2. jeremytai
    Member
    Posted 9 years ago #

    bump

  3. obeattie
    Member
    Posted 9 years ago #

    Yeah. You need to use the query_posts tag.

    Basically, you can combine criteria to get things working. The code you would need to insert, would be:

    <?php query_posts('cat=insert category id here&showposts=10') ?>

    Insert that code just before the loop starts and hey presto!

  4. jeremytai
    Member
    Posted 9 years ago #

    sweet! thanks for the info

  5. jeremytai
    Member
    Posted 9 years ago #

    Would that go after this:
    <php if (have_posts()) : while (have_posts()) : the_post(); ?>

  6. obeattie
    Member
    Posted 9 years ago #

    Just the ordinary code you'd use for the post

Topic Closed

This topic has been closed to new replies.

About this Topic