Child page for every category WordPress

I create in my wordpress theme template page named popular.php, where i sort post by popularity. It works fine for every post but I dont know how to do this for category.

I want something like this: – works fine – i don’t know how to make popular page child for every category?

Popular loop works fine with this args:

<?php $current_category_ID =  getCurrentCatID(); ?>
 <?php $args = array(
      'posts_per_page' => 60,
      'cat' => $current_category_ID,
      'meta_key' => 'views',
      'orderby' => 'meta_value_num',
      'order' => 'DESC',
 ); ?>

 <?php query_posts($args); ?>

Only I don’t know make it child for category?

Read more here: Child page for every category WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *