neilgee
3/22/2014 - 12:53 AM

Replace the Genesis Footer Area with a widget

Replace the Genesis Footer Area with a widget

<?php //<~ don't add me in


//Remove Existing Footer
remove_action( 'genesis_footer', 'genesis_do_footer' );
/**
 * Add Footer Widget to Genesis
 *
 * @link http://wpbeaches.com/create-footer-widget-area-genesis-child-theme/
 */
 add_action( 'widgets_init', 'yourtheme_extra_widgets' );
// Add in new Widget area
function yourtheme_extra_widgets() {	
	genesis_register_sidebar( array(
		'id'            => 'footercontent',
		'name'          => __( 'Footer', 'yourtheme' ),
		'description'   => __( 'This is the general footer area', 'yourtheme' ),
		'before_widget' => '<div class="footercontent">',
	    	'after_widget'  => '</div>',
	));
}
	
add_action('genesis_footer','yourtheme_footer_widget');	
// Position the Footer Area
function yourtheme_footer_widget() {
	genesis_widget_area ('footercontent', array(
		'before' => '<div class ="footercontainer">',
		'after'  => '</div>',
	));
}