Sorry for the vague title decription - Couldn't word it any different.

In my index.php page I have the following code:

<?php  if (is_category('6')) { ?>
<?php include (TEMPLATEPATH . '/blog.php'); ?>
<?php } else { ?>
<?php if ( is_front_page() ) {
      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
      query_posts("cat=5&paged=$paged");} ?>

Now, I'd like to include another category in the 'blog.php' template, but simply adding the cat number in the first line, like:

<?php  if (is_category('6, 7')) { ?>

is not working and simply ignores both.

Any idea of what I'm missing here, or perhaps a better way to do it altogether?


1 Answer 1


You need to put it in an array.

<?php if(is_category(array(1,2,3,4)) ?>
  • Thanks, This works! It was just missing the left gullwing, as in:
    – user2294
    Jan 28, 2011 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.