Support » Fixing WordPress » Why is home.php / index.php in a category?

  • Resolved fatbeing

    (@fatbeing)


    I’ve been experimenting with running some code based on the is_category(‘blah’) tag in my header.php, and I found that the code runs even if I’m on the home page. Turns out that even my index.php and home.php return true for one of my categories. I verified this by putting the_category(); in my home.php.

    How do I get is_category() to return false for my home page?

    My Category IDs (the only ones I’m using in the header):
    4 – Recipes
    5 – Curricula
    7 – Projects
    8 – Software (this is the code that runs if I’m on the home page)

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Why is home.php / index.php in a category?’ is closed to new replies.