title: Wordpress - Multiple categories in a category page
body: <p>I have a problem on my category template. I use the function <code>get_the_category()</code> to get the current category of the page. </p>
  
  <p>I take the first one of the array to select the posts and show in my custom menu the current category.</p>
  
  <p>It works well for all my categories except for one. 
  In this category (which is exactly the same as the others, no particularities), <code>get_the_category()</code> return 2 categories instead of one, and the first category of the array is not the good one.</p>
  
  <p>How can I fix this ?</p>
  
  <p><strong>EDIT :</strong> This is the return array of the <code>get_the_category()</code> function :</p>
  
  <pre><code>Array
  (
      [0] =&gt; WP_Term Object
      (
          [term_id] =&gt; 152
          [name] =&gt; Press
          [slug] =&gt; press
          [term_group] =&gt; 0
          [term_taxonomy_id] =&gt; 152
          [taxonomy] =&gt; category
          [description] =&gt; Press
          [parent] =&gt; 0
          [count] =&gt; 46
          [filter] =&gt; raw
          [object_id] =&gt; 32182
          [cat_ID] =&gt; 152
          [category_count] =&gt; 46
          [category_description] =&gt; Press
          [cat_name] =&gt; Press
          [category_nicename] =&gt; press
          [category_parent] =&gt; 0
      )
  
  [1] =&gt; WP_Term Object
      (
          [term_id] =&gt; 178
          [name] =&gt; The Fundation
          [slug] =&gt; the-fundation
          [term_group] =&gt; 0
          [term_taxonomy_id] =&gt; 178
          [taxonomy] =&gt; category
          [description] =&gt; 
          [parent] =&gt; 0
          [count] =&gt; 10
          [filter] =&gt; raw
          [object_id] =&gt; 32182
          [cat_ID] =&gt; 178
          [category_count] =&gt; 10
          [category_description] =&gt; 
          [cat_name] =&gt; The Fundation
          [category_nicename] =&gt; the-fundation
          [category_parent] =&gt; 0
      )
  
  )
  </code></pre>
  
  <p>I got this for the category page the-fundation</p>