• Hello

    I would like to specify a child category while instantiating WP_Query in the following format:

    <?php $the_query = new WP_Query(array( ‘category_name’ => ‘[child category]’)); ?>

    So far, I tried this format with no luck: array(‘category_name’ => ‘[parent category]-[child category]’

    Please tell me how the child category should be defined.

    Thank you in advance

  • The topic ‘How do you specify a child category with category_name?’ is closed to new replies.