Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Greetings!

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?

Thanks

share|improve this question
add comment

1 Answer

You need to put it in an array.

<?php if(is_category(array(1,2,3,4)) ?>
share|improve this answer
    
Thanks, This works! It was just missing the left gullwing, as in: –  user2294 Jan 28 '11 at 2:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.