Created
October 8, 2014 14:48
-
-
Save joeyz/77757e62bce910172ec2 to your computer and use it in GitHub Desktop.
Add top widgeted area in a genesis theme
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 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