follow mejoin mesubscribe
Get Your own Toll Free Number

Relocate the Genesis Footer Widgets

Since Genesis 1.6, you can add footer widgets to your child themes with one line of code.  You can read more about adding the footer widgets at StudioPress.

By default the footer widgets are output just before the footer.  If you want to relocate them you can do that using hooks.

/**
 * Relocate Footer Widgets
 *
 * @author Jen Baumann
 * @link http://dreamwhisperdesigns.com/?p=726
 */
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
add_action( 'genesis_after_content_sidebar_wrap', 'genesis_footer_widget_areas' );

In this particular case, I wanted them output just outside the content-sidebar-wrap.

Bonus: Show the Genesis Footer Widgets on the homepage only:

/**
 * Footer Widgets on homepage only
 *
 * @author Jen Baumann
 * @link http://dreamwhisperdesigns.com/?p=726
 */
add_action( 'genesis_before', 'child_conditional_footer_widgets' );
function child_conditional_footer_widgets() {
	if( is_home() )
		return;

	remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
}

You should add this anywhere after this line: require_once(TEMPLATEPATH.'/lib/init.php'); but before the final ?> tag at the end of the file.

About Jennifer Baumann

I am an avid horseback rider, animal lover, and freelance designer. I love working with WordPress and Genesis and work for Copyblogger Media as a Technical Support Advocate.

Trackbacks

  1. [...] the client only wanted the footer widgets to be displayed on the homepage. I found a tutorial by Dream Whisper Designs that demonstrates the following code to be placed into your functions.php file. This works [...]

Dream Whisper Designs is Powered by Genesis

StudioPress Premium WordPress Themes

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.