Support » Themes and Templates » Index page assigning self to category of latest post

  • Resolved robrat

    (@robrat)


    Hi there, my site betterRetailing has a pretty long if on the header which assigns styles depending on which page is being displayed. I published a post in one category that made the appearance of the header change and it would appear the index.php is assigning itself as a category depending on whatever is the latest post on the page. I’ve put in a hidden the_category tag in the navigation that shows the homepage is in the money category (currently the latest post there).

    What’s going on, because if it does this then my big if is suddenly redundant, and I’m going to have to go back to having several header files as before.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter robrat

    (@robrat)

    An example of somewhere it’s happening is at http://www.betterretailing.com/page/5/

    If you search the source for “hidden” you’ll see third result is category IS see my shop. Why is it? An index surely can’t be in a category…

    Thread Starter robrat

    (@robrat)

    Can anyone think of a reason why an index.php page might have a category automatically assigned to it? I’ve put code for it right at the top of the header now, so any page on the site you’ll see it’s assigning a category related to what posts are shown within it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Index page assigning self to category of latest post’ is closed to new replies.