Site logo

Archived topic

Second footer for different site areas

13 replies · Started by Mathias on April 17, 2020

Viewing posts 1–14 of 14

It's a minor question, but is there a way to have two or more different footers, which then are related to certain pages or posts? The question is actually about a different designed landing page and mainly about changing the background color.

Hi there,

if its simple styling changes then we can take advantage of CSS Classes that WordPress adds to each page.

For example this CSS:

.home .footer-widgets {
    background-color: red;
}

Targets just the home page and changes the footer widgets background color.

Whereas your events page has a unique class of: page-id-8494 - so you could target that like so:

.page-id-8494 .footer-widgets {
    background-color: red;
}

Thank you David! I did not know about page-ID in CSS. Great.

Glad to be of help

I have a question related to this.
How about if I want to have an alternate footer for a specific page? what would the code be? the normal footer has three links but I want to create one that only has two links for a specific page.
thanks.

We can just hide that one link on that specific page with some CSS.

Can you link me to the page in question?

Feel free to open a new topic so you can use the private URL field.

Let me know :)

thanks, you can take a look at any page footer. they are all the same. On certain pages I just want to hide the "home" link on the footer
thanks

Can you link me to the page in question?

I just want to hide the “home” link on the footer

Since we did it like David suggested, you may easily us the page-ID in CSS, find the ID of that certain item with your browser developer mode and set it to "display: none".

Would this do the trick?

.page-id-8492 .menu-item-675 {
display: none;
}

(IDs are examples.)

it did not work. I'm assuming the page ID is the page that I want to hide the item on and the menu item is the home page link? That's what I entered in but it's not working

Can you share a link to your site? You can raise a new topic where you can use the Site URL field to share the link privately.

ok

Hi David

Adding different css to different footers is great but is there a way to have 2 different footers with entirely different content?

Or would just disable the primary footer on the page I want different content and create a section that appears like a footer with widgets of content?

This archived topic is closed to new replies.