Sonya Lynn Designs

Blogging McBloggerson

  • About Me
  • My Blog
    • WordPress How To
    • WordPress Plugins
    • WordPress Themes
You are here: Home / Wordpress / Wordpress Themes / Genesis Theme Framework / How To Add A New Widget Area Before Footer

How To Add A New Widget Area Before Footer

January 10, 2021 by Sonya Lynn Designs Leave a Comment

Sometimes you may want to add another widget area that doesn’t come with your Genesis child theme. Here’s an example to add a widget area before the footer area.

Paste the following PHP code to the end of your child themes functions.php file. (This is only used for Studiopress Genesis Framework.)

genesis_register_sidebar( array(
	'id'          => 'before-footer',
	'name'        => __( 'Before Footer' ),
) );

add_action( 'genesis_before_footer', 'before_footer_widget_area', 5 );
function before_footer_widget_area() {

	genesis_widget_area( 'before-footer', array(
		'before' => '<div class="before-footer"><div class="wrap">',
		'after'  => '</div></div>',
	) );

}

Change the genesis_before_footer hook to specify the desired widget area location.

Related

Filed Under: Genesis Theme Framework

Leave a Reply Cancel reply