How do you turn off footer display for some pages and have it display on others

I want to remove the footer from some site pages (e.g, the welcome page) but want it to appear on most other pages. I see how you can brute force footer on/off across a site via layout.phtml or other code changes but I wonder if there’s a way to turn off display of the footer on a particular page? I thought maybe the “Class” field for that page is the solution but I haven’t been successful going that route. I’m using a tweaked version of CenterRow theme if that matters.

Hi! You could indeed do this with the body classes on pages.

You can use the CSS Editor module to add the following lines:

body.site-page-welcome footer {
display:none;
}

That will remove it from the front page. You can add more particular pages as you identify them. Do you have a more comprehensive list of where you don’t want it?

This is not perfect (some modules add pages, like Item Sets Tree, that doesn’t enter any classes or IDs into the body that would help you point to them) but if you only want to turn off a few this may be sufficient.

I see what you’re getting at and I just need to figure out how to identify my page(s). Is it the stub value? Here’s one page where I’d like to suppress the footer (forgive the horrible URL…DNS work will come later): https://silverbox.gmu.edu/cspan/s/OralHistory/page/Home
What would you enter for body.site-page-welcome to handle that page? I put this in the “class” block on the page but it still displays the footer:

body.site-page-Home footer {
display:none;
}

@Wallygee You can’t add it to the class like that because it just outputs it to the class attribute.

image

You would want to use this module to add custom CSS without having to edit the template

Ah! I see what you mean. I moved that bit of CSS over to the CSS Editor block (which I was already using to get a new font) and now things work as I had hoped. I completely misunderstood the purpose of the Class field on a static page. Thanks all.