Simple Footer Setup?

Setting up a first time Discourse system here. I can find all manner of posts about creating fancy floating footers, but all I want is the ability to create a line of static text (ideally with links) at the bottom of all pages, and ideally different additional text/html at the bottom of selected pages. Searching in Admin settings isn’t finding anything obvious in terms of a simple procedure for activating a simple footer, and I’d like to avoid tampering with the CSS if possible. Thanks!

For a simple HTML footer, you can do that with our theme system. On your site, visit /admin/customize/themes. Select the active theme, and click Edit CSS/HTML. Within the theme editor, switch to the “Footer” tab and add the HTML you’d like. Click save, reload your site, and you should see the footer. Note that the footer will only appear when scrolled all the way down, so you may wish to check that it worked on a page without infinite scroll like /categories.

Hi. In fact, “categories” is my test page for this. There are only four categories. I can see my test footer in preview, but not on the actual page, even after refreshing the page. Do I have to restart Discourse entirely for this to activate on the actual site? Thanks very much!

That sounds like the theme isn’t active. Do you have multiple themes on your site?

No, only Light is active or can be selected by users.

That’s odd. I just tested that it’s working here - check out the bottom left corner of Categories - Discourse Meta.

Yeah, that’s where my test text show up in preview. But it’s not on the actual page. Is there some enabling step I might have missed?

Is there an alternative straightforward method for adding different footers to the bottom of different pages?

This is the most straightforward method (and the only one I can think of that doesn’t require a plugin).

Your theme looks like this, right? Theme is enabled, “Custom CSS/HTML” says “Common: Footer”?
image

If yes, do you have any other themes in the list? Perhaps you unintentionally switched to a different theme? To switch back, visit /my/preferences/interface and select the correct theme from the dropdown.

When I unticked “theme can be selected by users” for the Dark theme, a duplicate Light theme appeared in the theme list. My modifications should have been to the selected default one. I’ve now unticked “can be selected by users” for the duplicate Light theme and it moved down to inactive. So now the only active theme is Light and is has only “enabled by default” checked. The color scheme is Light (not “Light Scheme” – which is in the dropdown list – I didn’t change this). My test changes to the footer page are in the selected theme. I also have some additional CSS in the CSS section to remove the user stats from the About page – that worked OK.

I’m really not sure what else to suggest here. Your theme is clearly working if you’re seeing the custom CSS on the About page. Can you share the exact HTML you added to the footer? And the active CSS so I can test this out? Feel free to add it in this topic, or via PM if there’s something private in it.

Thanks. Nothing private. The CSS I added is:

section.about.stats {
display : none;
}

Under footer, all I have now is:
TEST

and as I mentioned, this shows fine in preview (but not on the actual page).

Ah! That’s not valid HTML. It shouldn’t display at all (not sure why it works in preview…).

Try wrapping that in <p> tags, so your HTML looks like this:

<p>TEST</p>

That’s it! Yeah, only preview shows it. I had been planning to add html tags in there but since preview was OK I was thrown off the track. Is there an easy way for me to remove that duplicate Light theme that is now in inactive (I’m assuming Light and Light Scheme color choices are the same?) How would I add a footer only to the bottom of a specific page? Thanks again!

You should be able to simply delete it.

That would require some CSS.

Presumably I’d have to find the correct components for specific pages. It can wait for now I think. I was able to delete the duplicate theme and switch to Light Scheme for colors, and it looks fine. Thanks again. Very impressed with how Discourse is put together (and the support on here!). I’ve been running mailing lists and forums for more years than I want to admit, and Discourse is really first class work.

1 Like

I’d like to do the same above and edit my footer, but I am using a remote theme (got the warning changes would be removed if it was updated). What’s the best way to do it so that it doesn’t get lost?

Thanks!
Ray

Create a new theme component from admin → customize → components.

And don’t forget to include the component in the theme you’re using!

1 Like

I use this and it works well:

1 Like