[Resolved] Adding an additional widget with a non existing before_footer_widgets hook

Home Forums Support [Resolved] Adding an additional widget with a non existing before_footer_widgets hook

Home Forums Support Adding an additional widget with a non existing before_footer_widgets hook

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1566124
    Webmaster

    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.

    #1566317
    Leo
    Staff
    Customer Support

    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.

    #1653221
    Webmaster

    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.

    #1653249
    Webmaster

    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.

    #1654869
    Leo
    Staff
    Customer Support
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.