$wp_query issue when trying to create a virtual page

I found this and it works. The big difference is that it checks if $post count == 0 and the creates the virtual page which will then allow all the other queries to function as normal. <?php /* Plugin Name: Virtual Page Plugin URI: http://davejesch.com Description: Create a virtual page with content Author: Dave Jesch … Read more

Query child’s child categories

Ok then, I actually was getting the subcats with the wrong method. in $parent_cat = get_cat_ID( $cat_name ); $cat_name wasn’t a name but un slug. First mistake. So I corrected with $parent_cat = get_category_by_slug( $cat_slug ); The final code is : // Get the parent cat thanks to the page’s cat slug $parent_cat = get_category_by_slug( … Read more