3 Columns, 3 Categories
-
Right now, in my layout, I have three columns, and I want each want to display a different category. The way I have it now, each column is it own php file, with its own loop, and I just call all three to the index page. It works fine.
Within each loop, I just exclude the other two categories, with:
<?php if (in_category('3')) continue; ?> <?php if (in_category('5')) continue; ?>
It works but I’m wandering if there is a better way. Maybe with query_posts. I want a way to just restrict each column to 1 category, instead of doing it backwards and excluding all the others, you know what I mean?
Plus I might add more sections, which means my exclude list would grow. I read the query_posts page, but I still cant quite figure it out. Since you apply them outside the loop, it affects all my 2nd and 3rd loop when I dont want it to.
Any ideas?
- The topic ‘3 Columns, 3 Categories’ is closed to new replies.