How to make footer stick to bottom?

No worries, that’s what this Discourse is for @Alexander :+1:

Well, I’m fan of a clear structure, like:

<body>
    <header>...</header>
    <main>...</main>
    <footer>...</footer>
</body>

Gutenberg decided to introduce a little intruder here - the .wp-site-blocks wrapper.

Please check this topic for more info in that regard:
Gutenberg $content wrapper - General - Cwicly

Unfortunately, as far as I’m aware, we have no control of where to place the global elements, as they get placed on the root level, like where the .wp-site.blocks wrapper sits.
So, the best solution is to just ignore this wrapper and act like it’s not there.

To answer your question. Since we don’t have a choice, we need to work with what we get.
You should have a consistent approach though.

Like mentioned above,

if you create a footer as a global part, you also should do the same for the header.
Please share your current setup from the Themer if you have issues to follow my advice.

The Post Content block is an independent block and has nothing to do with the .wp.site-blocks wrapper.
It’s always (and only) required if you add content on a page or post level.
This, of course, also depends on your general approach and how you setup your site - also in terms of your template setup in the Themer.

In most cases, it’s recommended to apply the <main> tag to the Post Content block.
As mentioned above, just ignore the .wp-site-blocks.
It’s a meaningless element, DOM structure wise.
No one cares about it from a technical perspective.

1 Like