I’m trying to create a subcategory template of a defined category.
For example, for each one, I would like to check if his subcategory Photos
exists and to get posts of this.
Here is my category tree:
— Category Sessions
— — Subcategory Session 2015
— — — Subcategory Photos
— — — Subcategory ...
— — — Subcategory Videos
— — Subcategory Session 2014
— — — Subcategory Photos
— — — Subcategory ...
— — — Subcategory Videos
— — Subcategory Session 2013
— — — Subcategory Photos
— — — Subcategory ...
— — — Subcategory Videos
If subcategory Photos
of this session category exists :
My idea is to have a query such as :
$wp_query = new WP_query(... Session 20XX/Photos ...&showposts=20);
Is there a way to do that please?