Archived topic
How to add content between Footer Widget Area and the Footer Area?
5 replies · Started by Alberto on January 11, 2021
Hello there,
first of all, thank you for your amazing product!
I was wondering how to add a search bar with icon (no matter the style, I will add CSS for that) between the Footer Widget Area and the Footer Area. As you can see at the provided link, the grey area is the footer widget area while the white bar at the very bottom if the actual footer/copyright area.
I know I could enable the fifth footer widget and show it at bottom (instead of same-line as the existing four) but I do not think it is the right thing to do here. Maybe a footer hook would be better?
The final design should be as it is now but with a search bar on the grey background (together with footer widgets but below).
Thank you in advance,
Alberto
Hi,
I was wondering how to add a search bar with icon (no matter the style, I will add CSS for that) between the Footer Widget Area and the Footer Area. As you can see at the provided link, the grey area is the footer widget area while the white bar at the very bottom if the actual footer/copyright area.
You may find this useful:
https://docs.generatepress.com/article/hooks-visual-guide/
With this Hook visual guide, you can use Block element or Hook Element to hook in your content(in your case, the search icon) and set the "hook" value to generate_after_footer_widgets hook. You then set the display rule location on pages or posts you want this applied on.
Know more about Block Element here:
https://docs.generatepress.com/article/block-element-overview
Know more about Hook Element here:
https://docs.generatepress.com/article/hooks-element-overview
Hi Elvin,
thank you for your reply.
I set it up as you suggested (Hooks - generate_after_footer_widgets), but what should I add in the code box? I tried with a shortcode (enabling Executing Shortcodes) but it does not work. I am sorry but I am quite new to hooks.
Alberto
I set it up as you suggested (Hooks – generate_after_footer_widgets), but what should I add in the code box? I tried with a shortcode (enabling Executing Shortcodes) but it does not work. I am sorry but I am quite new to hooks.
You have to make sure you've set the display rule location properly.
Also, you can test if the shortcode actually works.
Try putting it on a shortcode block on gutenberg and save it. Check it on the live site if it works.
Hi Elvin,
I managed to do it through a PHP function and enable it by executing PHP (display rule set to entire site) on your suggested hook.
Thanks again,
Alberto
Nice one. Glad you got it to work. No problem. :)