This code has been written in response to a support request from a member:
I’m using the Enterprise Pro theme and I’m trying to add a widget area directly above the 3 footer widgets so that it’s visible on all pages. I tried adding a widget area using the “genesis_before_footer” hook, but that broke the site – not sure if there’s a conflict with the code I currently have for the “before content widget”. I also tried adding the widget using the “genesis_after_content_sidebar_wrap” hook, but that did not display anything.
The code adds a new widget area before the footer widgets in most Genesis child themes. Here’s an example showing the widget area added before the footer using the Genesis Sample child theme :
# Step 1 – Using a code editor, copy and paste the following PHP code to the end of your child themes functions file.
Here’s what the PHP code looks like once added to the end of the Genesis child themes functions file :
Tested using the Enterprise Pro & Genesis Sample child theme by StudioPress.
genesis_before_footer hook in the above code to change the position of the widget area.
Note : Step 2 is only required if you want to exclude the widgets from showing on specific page(s).
# Step 2 – If you only want the widget on the front page, you can add a conditional tag to the code like this :
if ( ! is_front_page() ) return;
The code would now look like this :
Here’s what this code snippet looks like once added to the end of the Genesis Sample themes functions file :