Quantcast
Channel: Dream Whisper Designs » Jennifer Baumann
Viewing all articles
Browse latest Browse all 11

Relocate the Genesis Footer Widgets

$
0
0

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.

The post Relocate the Genesis Footer Widgets appeared first on Dream Whisper Designs.


Viewing all articles
Browse latest Browse all 11

Trending Articles