Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active May 4, 2017 03:20
Show Gist options
  • Save neilgee/9985899 to your computer and use it in GitHub Desktop.
Save neilgee/9985899 to your computer and use it in GitHub Desktop.
Footer Widget Header Full Width Wrap
<?php
//do not add in opening php tag
/**
* Add a Header Row above the 3 footer widgets in Genesis Theme
*
* @package Add a Header Row above the 3 footer widgets
* @author Neil Gee
* @link https://wpbeaches.com/add-full-width-row-footer-widgets-genesis-child-theme/
* @copyright (c)2014, Neil Gee
*/
add_action ( 'widgets_init','genesischild_footerwidgetheader' );
// Extra the Footer Header Widget Area.
function genesischild_footerwidgetheader() {
genesis_register_sidebar( array(
'id' => 'footerwidgetheader',
'name' => __( 'Footer Widget Header', 'genesis' ),
'description' => __( 'This is for the Footer Widget Headline', 'genesis' ),
) );
}
// Action set to a higher priority to fire before footer widgets.
add_action ( 'genesis_before_footer','genesischild_footerwidgetheader_position', 5);
// Position Footer Header Widget.
function genesischild_footerwidgetheader_position () {
echo '<div class="footerwidgetheader-container"><div class="wrap">';
genesis_widget_area ( 'footerwidgetheader' );
echo '</div></div>';
}
@TheVishalSharma
Copy link

Good one. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment