title: Get the name of the first category
body: <p>I am trying to create a single page that lists the content of each category. I have managed to create the list. I now need to get the name of the category. I have the following code:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt; CATEGORY NAME HERE &lt;/li&gt;
  
      &lt;?php query_posts('cat=0'); ?&gt;
      &lt;?php while ( have_posts() ) : the_post(); ?&gt;
          &lt;li&gt;
              &lt;a href="&lt;?php echo get_permalink(); ?&gt;"&gt;
              &lt;?php the_title(); ?&gt;&lt;/a&gt;
          &lt;/li&gt;
      &lt;?php endwhile; ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>How to call the name of the first category (0)?</p>
  
  <p><strong>Current edit</strong>: Why won't multiple works?</p>
  
  <pre><code>&lt;div class="first-col"&gt;
      &lt;ul&gt;
          &lt;?php query_posts('cat=0'); ?&gt;
          &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  
          &lt;li&gt; &lt;?php $category = get_the_category(); 
          echo $category[0]-&gt;cat_name;
          ?&gt; &lt;/li&gt;
          &lt;li&gt;
              &lt;a href="&lt;?php echo get_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
          &lt;/li&gt;
          &lt;?php endwhile; ?&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div class="first-col"&gt;
      &lt;ul&gt;
          &lt;li&gt; &lt;?php $category = get_the_category(); 
          echo $category[0]-&gt;cat_name;?&gt; &lt;/li&gt;
  
          &lt;?php query_posts('cat=3'); ?&gt;
          &lt;?php while ( have_posts() ) : the_post(); ?&gt;
              &lt;li&gt;
                  &lt;a href="&lt;?php echo get_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
              &lt;/li&gt;
          &lt;?php endwhile; ?&gt;
  
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>