At the moment I am trying to restyle categories.php a little bit.
Part of it is the following code:
$categories2 = get_categories($cat_id);
$site_template->register_vars("categories2", $categories2);
unset($categories2);
I am searching for a way to fill the $cat_id in this code with the value of the cat_parent_id of the category
Example:
cat_id 1 = category A: Soccer Game
cat_id 2 = subcategorie 1: Team 1 (cat_parent_id 1)
cat_id 3 = subcategorie 2: Team 2 (cat_parent_id 1)
cat_id 4 = subcategorie 3: Team 3 (cat_parent_id 1)
So if people are in the cat_id 2, I would like to fill $cat_id with value "1".
Does somebody know how to do this?
kind regards,
Piet