• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Add New Widget Area Before Footer Widgets In Genesis

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 :

New Widget Area Before Footer

Installation Steps

# 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 :

Step 1 - Add PHP code to functions file

Tested using the Enterprise Pro & Genesis Sample child theme by StudioPress.

Change the 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 :

Step 2 - Add conditional tag tp PHP cocde

Enterprise Pro Theme Footer Widgets

Reader Interactions

Comments

  1. BetsyAgnes says

    November 11, 2016 at 7:31 am

    Works perfectly! Thank you, Brad!

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.