Different sidebars on child categories
-
Hello.
I have plan to use WordPress the way, where there are 5 big categories where are also several child categories on each. I know hot to use different sidebars on different categories, but what I would like to know is how to force child categories AND also posts under those child categories to use main category sidebar.
For example: i have category ID 3 and child category 7 and post ID 24
I want to make category-3.php where there is usage of some sidebar file. So i’d like to have possibility that also category 7 and post 24 will use that sidebar.There is always possibility to use if statement but on that case, i have to update that every time i create new child category. Also, it wont work for posts.
I have understanding of php but i am no programmer, so im not ale to figure it out by myself.
I have feeling, it should be something like this by logic – if child of XX then call YY elseif ZZ then call QQ etc etc.
Is there some solution to this already or can someone help me out of trouble?
- The topic ‘Different sidebars on child categories’ is closed to new replies.