title: Custom post type loop the parent category
body: <p>On single.php i have a standard WP loop which displays post content.</p>
  
  <pre><code>&lt;main&gt;
      &lt;div class="container"&gt;
          &lt;?php if (have_posts()): while (have_posts()) : the_post(); ?&gt;
  
              &lt;article&gt;
                  &lt;div class="col-md-12"&gt;
                      &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
                      &lt;?php the_content(); ?&gt;
                  &lt;/div&gt;              
              &lt;/article&gt;
          &lt;?php endwhile; ?&gt;
          &lt;?php endif; ?&gt;
      &lt;/div&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>Bellow it i have simple loop that displays 3 latest custom post type items</p>
  
  <pre><code>&lt;div class="manuals"&gt;
  
              &lt;?php
                      $loop = new WP_Query( array(
                              'post_type' =&gt; 'manuals',
                              'posts_per_page' =&gt; 3
                          )
                      );
              ?&gt;
  
              &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
                      &lt;div class="col-md-12"&gt;
  
                                  &lt;?php if ( has_post_thumbnail()) : // Check if Thumbnail exists ?&gt;
                                      &lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;
                                          &lt;?php the_post_thumbnail(); // Fullsize image for the single post ?&gt;
                                      &lt;/a&gt;
                                  &lt;?php endif; ?&gt;         
                                  &lt;h5&gt;&lt;?php the_title(); ?&gt;&lt;/h5&gt;
                      &lt;/div&gt;
              &lt;?php endwhile; wp_reset_query(); ?&gt;    
  &lt;/div&gt;
  </code></pre>
  
  <p>Both the posts and custom post type share 2 WP categories (simple, advanced).
  If the user opens up an article which is posted in "advanced" category , i would like the custom post type only to show posts from "advanced" category...</p>
  
  <p>Hope you understood what i mean, english isnt my first language... Thanks for the help!</p>