Last active
December 15, 2015 17:39
-
-
Save braddalton/5297938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Register sub widget areas */ | |
genesis_register_sidebar( array( | |
'id' => 'sub-widget-left', | |
'name' => __( 'Sub Widget Left', 'child' ), | |
'description' => __( 'This is the sub widget left section.', 'child' ) | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'sub-widget-right', | |
'name' => __( 'Sub Widget Right', 'child' ), | |
'description' => __( 'This is the sub widget right section.', 'child' ) | |
) ); | |
/** Add the sub widget section */ | |
add_action( 'genesis_before_footer', 'wpsites_sub_widget', 5 ); | |
function wpsites_sub_widget() { | |
if ( is_active_sidebar( 'sub-widget-left' ) || is_active_sidebar( 'sub-widget-right' ) ) { | |
echo '<div id="sub-widget"><div class="wrap">'; | |
genesis_widget_area( 'sub-widget-left', array( | |
'before' => '<div class="sub-widget-left">' | |
) ); | |
genesis_widget_area( 'sub-widget-right', array( | |
'before' => '<div class="sub-widget-right">' | |
) ); | |
echo '</div><!-- end .wrap --></div><!-- end #sub-widget -->'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment