Forums

Different footer to every page (9 posts)

  1. Fregatt
    Member
    Posted 1 year ago #

    Hello!

    I'm in need of help once again. I'd like my footer to look different in all pages.

    I found this for the header: http://codex.wordpress.org/User:Esmi/_Changing_Headers_with_body_class%28%29

    I'd like to do exactly the same thing but with the footer instead. So if anyone could help me with some code that would make my day!

    Thanks a lot for helping!

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    same thing;
    substitute #header with #footer (assuming that #footer is the css id of you footer div) and you are done.

    this can obviously only change the formatting of the footer.

    for more detailed replies, please post a link to your site.

  3. Fregatt
    Member
    Posted 1 year ago #

    Ok! Thanks for answering!

    But is it possible to put a body tag in the footer?
    Sorry, I'm not very skilled when it comes to this..

  4. alchymyth
    The Sweeper
    Posted 1 year ago #

    the body tag is only allowed once at the start of the site (in a theme this would be in header.php).

    body tag:
    <body>

    body tag with body_class:
    <body <?php body_class(); ?>>

    but the css of the body tag reaches all the way down to the end of the site.

  5. Fregatt
    Member
    Posted 1 year ago #

    ok, thanks again! I will try that and see if it works!

  6. Fregatt
    Member
    Posted 1 year ago #

    Hello again!

    I havn't been able to get it working. I did also try to make a header that is unique for every page. I thought it would be a good idea to get it work in the header first, to understand how I can use the same method in the footer.

    I try to follow this guideline: http://codex.wordpress.org/User:Esmi/_Changing_Headers_with_body_class%28%29

    But I'm not really sure where in the code to put this:

    "body.category #header url{background-image:url(images/header2.jpg;}"

    Thanks for helping!

  7. alchymyth
    The Sweeper
    Posted 1 year ago #

    please mark any code using the 'code' button (clicked once before writing/pasting the code, then click again once after; or highlight the code and click the 'code' button)

    body.category #header url{background-image:url(images/header2.jpg;}

    belongs into style.css of the theme (or in some themes into a css file for custom changes, or rarely into an option area in the dashboard)

    posting a link to your site might help to get you more useful replies.

  8. Fregatt
    Member
    Posted 1 year ago #

    Hello again alchymyth!
    I'm so thankful that you are willing to help me :)

    This is the link to the site: http://vidasnickeri.se/

    As you see there is a header with pictures in. I'd like the pictures to be different on every page. It just won't work to me!

    Sorry, I havn't noticed the "code" button before, I'll use it from now :)

  9. Fregatt
    Member
    Posted 1 year ago #

    I'm also willing to try other ways of doing this if there is a more simple way!

Topic Closed

This topic has been closed to new replies.

About this Topic