Support » Themes and Templates » Different style on homepage and on subpages

  • Hi all,

    I am trying to apply a different style for some <div> on the homepage and on the subpages. I found that the is_home or is_front_page condition will make it, but I havent succeeded :/. Ive found also a lot of howto`s but nothing worked. Maybe its something wrong in my files .. but please guys, if somebody has experiences with this issue and had solved it on the 2.8.4 version, try to help me a little.

Viewing 7 replies - 1 through 7 (of 7 total)
  • How about this?


    ow, i understand what the theme is about. I have already created my own, the issue is that i need to display a different background pattern on the homepage and on the subpages.

    And for this purpose are the conditional tags like is_home, is_front_page to check if i am on the homepage right now or not.

    .. and these tags are not working for me :/ so i am asking if there is another way to find if i am viewing the homepage or the subpage .. or i dont know .. i need an advice how to solve it .. thanks

    Then go back to the link I gave: it’s possible to have different page-templates for pages, and thus change the look of each and every page.


    thanks, but i would like to solve this issue with some php script because of performance (fast page loading) ..

    i think its faster to analyse the “if then” statement like to load a completely different page.

    Do you have an idea how to write that php script which will work with wp 2.8.4 ?

    Oke, then see whether body_class() helps you (pointed out/written by a fellow regular on this forum).


    .. that is what I was looking for, thank you very much 😉

    Thanks @pboosten for pointing to the link on body_class()… it made my day! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Different style on homepage and on subpages’ is closed to new replies.