Site logo

Archived topic

Adding an additional widget with a non existing before_footer_widgets hook

4 replies · Started by Webmaster on December 3, 2020

Viewing posts 1–5 of 5

Hi

I would like to add a single widget with a "subscribe to email" in the footer.
Inside the footer but above the widgets.

There is a after_footer_widgets hook but unfortunately a before_footer_widgets hook doesn't exist yet.
So I'm looking for a workaround.

I've registered a new sidebar for this because I'm using this on multiple locations to place a widget using the after_content hook and assumed this would work here maybe too.

Hi there,

You should be able to use the before_footer_content hook for that:
https://github.com/tomusborne/generatepress/blob/master/footer.php#L32

What subscribes to e-mail form are you using? Are you able to insert it using a shortcode and just use the hook?

Also do you have an example of the layout you are trying to create? I wonder if we can just use the footer widget area with some CSS.

Hi

Late reply...
I'm looking for a bigger footer with more widgets.
See attached image, I would like to add an additional sidebar inside the footer but before the existing widgets.

But maybe I just create a child theme to get this done. Which I could avoid until now.

I just learned that there is a Block Element.

Which does perfectly fine fullfill my request to add a widget (which is then a block but all fine) to all pages in the footer before the existing footer widgets.

Great to see, again, how flexible generatepress is.

Glad to hear :)

This archived topic is closed to new replies.