WordPress.org

Ready to get started?Download WordPress

Forums

Different style on homepage and on subpages (8 posts)

  1. arnie2
    Member
    Posted 4 years ago #

    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.

  2. Peter Boosten
    Member
    Posted 4 years ago #

    How about this?

    Peter

  3. arnie2
    Member
    Posted 4 years ago #

    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

  4. Peter Boosten
    Member
    Posted 4 years ago #

    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.

    Peter

  5. arnie2
    Member
    Posted 4 years ago #

    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 ?

  6. Peter Boosten
    Member
    Posted 4 years ago #

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

    Peter

  7. arnie2
    Member
    Posted 4 years ago #

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

  8. Sapan Shah
    Member
    Posted 4 years ago #

    Thanks @pboosten for pointing to the link on body_class()... it made my day! :-)

Topic Closed

This topic has been closed to new replies.

About this Topic