• Roar

    (@rori)


    <?php query_posts('cat=1,2');?>

    If I include the above at the top of my index.php, it bypasses the real index page and opens one that says:

    You are browsing the BlahBlah Category Archives (BlahBlah=Cat#1)

    Did I muck something up in that code?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Joshua Sigar

    (@alphaoide)

    When you pass cat=2 to query_post, WP will load one of the templates in the following priority order.

    1. category-2.php
    2. category.php
    3. index.php

    So, in your case, most likely that category.php template is the one that is loaded.

    If it’s for frontpage, you might want to try the following plugin.
    http://dev.wp-plugins.org/file/front-page-cats/trunk/front_page_cats.php

    Thread Starter Roar

    (@rori)

    Thank you that works, but then it undoes the Image Headlines Plugin.

    *tears out hair*

    Oh well, I guess I will have to choose which is more important.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using Query Posts code as shown… should bring up archive template?’ is closed to new replies.