WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Does category-3.php over ride query_posts ('cat=3,5,6,7')? (3 posts)

  1. richarduk
    Member
    Posted 6 years ago #

    I'm struggling to display multiple categories on a specific category page.

    If the category page is category-3.php then I might be using
    <?php query_posts($query_string . '&order=DESC&cat=3,5,8,7') ?> on that page and it's not working.

    Presumably the category-3.php overrides the query_posts?

  2. bcreighton
    Member
    Posted 6 years ago #

    No, your query string should override that. Something must be up with your query.

    I'd use query posts - http://codex.wordpress.org/Template_Tags/query_posts

  3. richarduk
    Member
    Posted 6 years ago #

    Thanks for putting me on the right track!

    I've spent an hour going round in circles. I removed $query_string . and it worked.

    I get muddled up with query_string. It's very specific - I have to drill it into my head - and preserves any information that was contained in the link that was clicked to arrive at a template

    Live and learn

Topic Closed

This topic has been closed to new replies.

About this Topic