I would like to display different number of post in different categories. My current code on category.php is <?php if ( is_category(array(2,37)) ) { include(TEMPLATEPATH . '/category1.php'); } else { include(TEMPLATEPATH . '/archive.php'); } ?> All i want to do is integrate the code below with category1 above, but do not how to do it. <?php query_posts('category_name=special_cat&showposts=10'); ?> help highly appreciated. nirav
Is this what you're trying to accomplish? If category id = 2 or 37 then include category1.php and display query_post code else include archive.php end if If so, then it should look like this: <?php if ( is_category(array(2,37)) ) { include(TEMPLATEPATH . '/category1.php'); query_posts('category_name=special_cat&showposts=10'); } else { include(TEMPLATEPATH . '/archive.php'); } ?>
hey that did not work for me for some reason. All i m trying to achieve is display different number of posts on different category for e.g. category1 - i want to display only 8 posts where as in category2 - i want to display 20 posts. cheers nirav