i want to convert a php code !

Status
Not open for further replies.

D4rk

Active Member
2,777
2010
588
130
hi

i need a small help from you guys

Code:
<?php $this_category = get_category($cat);   if($this_category->[COLOR=#ff0000][B]category_parent == 0)[/B][/COLOR] { include (TEMPLATEPATH . '/cat-featured.php'); } ?>

the above code, i want to edit it, instead of calling the cat-featured in all "parent categories" i want to call it in specific cats depends on IDs

any help ?
 
3 comments
PHP:
<?php 
$categories_to_show = array(1,2,3) // Categories ID's 
$this_category = get_category($cat);  

if(in_array($this_category->category_parent, $categories_to_show))
   include (TEMPLATEPATH . '/cat-featured.php'); 
 ?>
 
Status
Not open for further replies.
Back
Top