Trying to exclude the rendering of something based on category ID using the following...
<?php if ($_category_id == 2) { ?>
<?php //do nothing ?>
<?php } else { ?>
<?php //do something ?>
<?php } ?>
I need to specify multiple category ID's for exclusion however so I gather these need to be loaded into an array.
<?php $ignoredcats = array(2,360,124); ?>
<?php if (count(array_intersect($ignoredcats,$_category_id))) { ?>
<?php //do nothing ?>
<?php } else { ?>
<?php //do something ?>
<?php } ?>
This doesn't work though. How should I be specifying by multiple category ID please?