query_posts() and $query_string problem (1 post)

  1. Kriesi.at
    Posted 6 years ago #

    Hello everybody, I got a question concerning the $query_string variable.

    What I want to do is: i want to exclude one category from all of my archive pages. According to the Codex I just have to make a function call like this in my archive.php:

    query_posts($query_string . &cat=-3);

    This works to some degree: category 3 is excluded but the loop now always shows the same entries, no matter which category I am browsing to. I guess this is because $query_string is always empty (tested it with an echo statement on several pages/posts).

    Do I need to call a global first to make this work? Or is this not supposed to work that way? Would be glad if you could help me. Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic