title: Wordpress - List all category child post when in parent category
body: <p>I want to be able to list ALL posts (children and parent) when browsing a parent category.</p>
  
  <p>Like this:</p>
  
  <ul>
  <li>Parent (Show posts from Child 1 and Child 2)
  
  <ul>
  <li>Child 1 (Show only posts from Child 1)</li>
  <li>Child 2 (Show only posts from Child 2)</li>
  </ul></li>
  </ul>
  
  <p>With this code below (placed in category.php) I don't get all the posts when I'm in a parent category. I just get posts from ONE child category instead of several.</p>
  
  <p>Any ideas how to solve this?</p>
  
  <pre><code>&lt;?php get_header(); ?&gt;
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;?php get_template_part( 'include-cat-tag' ); ?&gt;
              &lt;div class="col-xs-12 col-sm-9 col-md-9 list-page-middle"&gt;
                  &lt;header class="clearfix"&gt;
                      &lt;h1&gt;&lt;?php single_cat_title( '', true ); ?&gt;&lt;/h1&gt;
                  &lt;/header&gt;
                  &lt;?php
                      wp_reset_query();
                      $categories = get_the_category();
                      $category_id = $categories[0]-&gt;cat_ID;
                      $args = array(
                          'posts_per_page' =&gt; 100,
                          'category__in' =&gt; array($category_id),
                          'orderby' =&gt; 'meta_value title',
                          'order' =&gt; 'ASC',
                          'post_status' =&gt; 'publish',
                          'meta_key' =&gt; 'betyg',
                          'child_of' =&gt; $category_id
                      );
                      query_posts( $args );
                      if (have_posts()): while (have_posts()) : the_post();
                      get_template_part( 'include-list-post' );
                  ?&gt;
                  &lt;?php endwhile; ?&gt;
                  &lt;?php else: ?&gt;
                      &lt;?php get_template_part( 'include-no-post' ); ?&gt;
                  &lt;?php endif; ?&gt;
              &lt;/div&gt;       
          &lt;/div&gt;
          &lt;?php 
              get_template_part( 'include-list' );
              get_template_part( 'include-social' );
          ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;?php get_footer(); ?&gt;
  </code></pre>