WordPress.org

Ready to get started?Download WordPress

Forums

Anyone experience query_posts not working? (2 posts)

  1. nouveller
    Member
    Posted 5 years ago #

    I've just loaded up a new blog that has two categories, with id's of 1 (Uncateogrized) and 3 (News). I want to exclude the News from the front page, so I've used :

    <?php query_posts("cat=-3"); ?>

    Which is even stated the the documentation. I've used this function for very complex things, this is it's simplest usage and it's not working. For now I've resulted to using :

    <?php query_posts("cat=1"); ?>

    But this isn't going to help when I add more categories.

    Any ideas?

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Could be a problem elsewhere in your code. It might help if you dropped a copy of that file into the WordPress pastebin.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.