Pre-footer

Since 2.37.0 every theme template has a pre-footer template part just before the footer, in an aside. It is for per-site content that belongs at the bottom of normal pages but not in the footer itself, such as sponsors, partners, an acknowledgement of country or a newsletter signup. A site that doesn’t use it sees no change.

Using it

Edit the part named Pre-footer in the Site Editor (it is registered in theme.json) and add blocks inside it. Since 2.37.1 the theme’s parts/pre-footer.html is the footer’s card structure with nothing in it, a Group with the class site-footer holding a Group with the class site-info, so whatever a site adds gets the footer’s card styling with no wrapper to build. It shows on every page whose template includes it: all the theme’s templates and footer.php. The wrapper element can be switched from aside to section in a template’s Template Part settings.

Where it does not show

Templates that leave the part out don’t show it. That is the point: LH Image Gallery’s photo pages, for example, have the footer but not the pre-footer. Templates registered by plugins (bbPress, knowledge base, portfolio and others) only include the header and footer, so they don’t show the pre-footer unless the plugin adds <!-- wp:template-part {"slug":"pre-footer","tagName":"aside"} /--> before its footer. A part a theme doesn’t have renders nothing for visitors, so adding it is safe on any theme. A site’s own edited copy of a theme template, saved before 2.37.0, needs the line added by hand.

Empty pre-footer

A pre-footer that holds nothing but empty Groups (the theme’s empty card) prints no HTML at all: no card and no aside landmark. Any other block added inside it counts as content. template_part_has_content() checks the part that actually renders, the site’s published copy or else the theme’s file, so an unpublished draft copy is ignored. filter_empty_pre_footer() applies it in block templates, and footer.php uses it for classic pages. The slug is filterable with lh_2015_pre_footer_slug.