WordPress.org

Support

Support » Themes and Templates » query_posts not working since upgrade to 2.1

query_posts not working since upgrade to 2.1

  • I have the following code in my theme index:
    <?php
    if (is_home()) {
    query_posts(“cat=-5”);
    }
    ?>

    To exclude category 5. I’ve upgraded to 2.1, and now the category posts are showing. Has this tag changed?

Viewing 13 replies - 1 through 13 (of 13 total)
  • No it hasn’t changed, I just upgraded to 2.1 and works for me. In 2.1 they combined the post categories with the link categories, so check if the ID is still the same.

    Nope, that’s not it; ID is still the same. Is there something that needs to go in the root index.php that I might have overwritten?

    I have the custom query string plugin on my blog and I noticed when I put 2.1 on that I was getting ALL blog posts to the front page instead of what I had defined both in the plugin and on the options page. So I think there is some sort of an issue there.

    I don’t know then, because it works with me, sorry

    Doesn’t work for me either and I haven’t edited any core files. Looking forward to hearing a response on this one.

    Do you have any plugins installed (such as Adhesive).

    Turn them off, they might be incompatible and they might be messing the loop.

    Thanks for the tip but, no dice.

    Yep, it is also stuffed on mine too.

    query_posts(‘category_name=daily-podcasts&showposts=10’);

    Only grabs 1 entry, even thou there are over 100 entries in the category.

    Nop, adhesive was screwing it up.. all good now.

    Unfortunately, Adhesive wasn’t the problem for me. I didn’t even have it installed. I did deactivate all of my plugins in hopes that one of them was causing the problem, but that didn’t work either. The code I’m using is this (in the home.php file).

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

    I’m starting to think that I need to try a fresh install of 2.1

    I’m getting this error:


    WordPress database error: [Unknown column 'category_id' in 'where clause']

    Seems there’s no longer a ‘category_id’ field in the posts table.

    Have I got a screwed install, or is the new table structure in 2.1 the cause of my problem?

    Switching off Adhesive solved the problem for me.

    I’m having the same problem :S I turned of Adhesive but the error is not gone yet.

    Any other ideas?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘query_posts not working since upgrade to 2.1’ is closed to new replies.
Skip to toolbar