title: Select the current category in wordpress, unexpected behavior
body: <pre class="lang-php prettyprint-override"><code>&lt;ul class="main-nav"&gt;
                  &lt;li class="menu-item &lt;?php if( is_category('one') || in_category('one') ) echo 'current_cat'; ?&gt;"&gt;
                      &lt;a href="/category/one/"&gt;one&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="menu-item &lt;?php if( is_category('two') || in_category('two') ) echo 'current_cat'; ?&gt;"&gt;
                      &lt;a href="/category/two/"&gt;two&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="menu-item &lt;?php if( is_category('three') || in_category('three') ) echo 'current_cat'; ?&gt;"&gt;
                      &lt;a href="/category/three/"&gt;three&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="menu-item &lt;?php if( is_category('four') || in_category('four') ) echo 'current_cat'; ?&gt;"&gt;
                      &lt;a href="/category/four/"&gt;four&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="menu-item &lt;?php if( is_category('five') || in_category('five') ) echo 'current_cat'; ?&gt;"&gt;
                      &lt;a href="/category/five/"&gt;five&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
  </code></pre>
  
  <p>The bottom line is that on the main page (index.php) is allocated category (in fact in theory this should not happen), a little closer examination I realized that the category in the main determined by the first post on a page - in which category he belongs. Suppose on the main page is present the latest news from the category of "2" - then the index page is the category of "2" ... What is the problem and how to fix it is not quite clear to me the behavior? What features are not taken into account? Thank you for your future answers.</p>
  
  <p>And I ask forgiveness for broken English.</p>