Skip to content

Instantly share code, notes, and snippets.

@joeyz
Created October 8, 2014 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyz/77757e62bce910172ec2 to your computer and use it in GitHub Desktop.
Save joeyz/77757e62bce910172ec2 to your computer and use it in GitHub Desktop.
Add top widgeted area in a genesis theme
/** Register Topads widget area */
genesis_register_sidebar( array(
'id' => 'topads',
'name' => __( 'Hero Area', 'custom-theme' ),
'description' => __( 'Here you can place a hero ad or a slider', 'custom-theme' ),
) );
/** Add topads widget after the primary menu */
add_action( 'genesis_before_content', 'custom_theme_topads' );
function custom_theme_topads() {
genesis_widget_area( 'topads', array(
'before' => '<div id="topads widget-area">',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment