Skip to content

Instantly share code, notes, and snippets.

@philipgledhill
Created April 21, 2014 06:24
Show Gist options
  • Save philipgledhill/11133925 to your computer and use it in GitHub Desktop.
Save philipgledhill/11133925 to your computer and use it in GitHub Desktop.
Genesis Framework widget area code for HTML5 themes
/** Register widget areas */
genesis_register_sidebar( array(
'id' => 'welcome-text',
'name' => __( 'Welcome Text', 'genesis' ),
'description' => __( 'This is the welcome text widget.', 'themename' ),
) );
/** Add the welcome text section */
add_action( 'genesis_before_content_sidebar_wrap', 'custom_welcome_text' );
function custom_welcome_text() {
genesis_widget_area( 'welcome-text', array(
'before' => '<div class="welcome-text widget-area">',
'after' => '</div>',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment