Okay guys, got another problem today, two, actually. Let's talk about the second one first. Now I know the following codes make WP display posts from Category-8 on the index_theme.php template and all other categories on Archive.php. My question is, what do I do if I need to display two categories on two different templates?? What if I want to use the index_theme.php for Category-8 and another new template- index_links.php - for another category, say, Category-9 and archive.php for every other categories?? These codes are for one single category, Category-8, but I need it to work for two categories. Can any one please help me out with this? <?php if (is_category(8)) { // looking for category 8 posts include(TEMPLATEPATH . '/index_theme.php'); } else { // put this on every other category post include(TEMPLATEPATH . '/archive.php'); } ?> Code (markup): Now, here's my first problem: how do I disable/subtract these two categories on Main page/index.php so that the main page doesn't show post from these two cats???? I hope I'm making sense. Thank you~
Your second problem first, solution would be to use elseif(is_category(9) { include blah.php; } Put it after the } for the IF and before the else. And first is second, try this link to exclude categories. http://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category
Thanx shallowink! first problem solved!! I'm having some problem with my second problem though, I inserted your code like this: <?php if (is_category(8)) { include(TEMPLATEPATH . '/index_theme.php'); } elseif(is_category(7) { include(TEMPLATEPATH . '/index_portfolio.php'); } else { include(TEMPLATEPATH . '/archive.php'); } ?> Code (markup): but it returned with this error: Parse error: parse error, unexpected '{' in C:\EP\wp\wp-content\themes\baj\category.php on line 5