title: Wordpress Category vs. Sub-category Conditional
body: <p>I'm trying to develop two different templates; one layout for a category listing, and a separate layout for subcategories.</p>
  
  <p>I believe it'd require a conditional statement detecting if the current category is a category or subcategory.</p>
  
  <p>I'm familiar with:</p>
  
  <pre><code>&lt;?php if (is_category('Category A')) : ?&gt;
  &lt;p&gt;This is the text to describe category A&lt;/p&gt;
  &lt;?php elseif (is_category('Category B')) : ?&gt;
  &lt;p&gt;This is the text to describe category B&lt;/p&gt;
  &lt;?php else : ?&gt;
  &lt;p&gt;This is some generic text to describe all other category pages, 
  I could be left blank&lt;/p&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>But I need this to be more dynamic and handle any category or subcategory without hard coding the cat ID number.</p>
  
  <p>Any help would be appreciated, thank you in advance.</p>