Created
March 19, 2013 16:28
-
-
Save braddalton/5197621 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
genesis_register_sidebar( array( | |
'id' => 'before-content', | |
'name' => __( 'Custom Widget', 'child' ), | |
'description' => __( 'This is the before content widget.', 'child' ), | |
) ); | |
// Hook before-post widget to single page | |
add_action( 'genesis_before_content_sidebar_wrap', 'custom_before_content', 9 ); | |
function custom_before_content() { | |
if ( is_single() && is_active_sidebar( 'before-content' ) ) { | |
echo '<div class="before-content"><div class="wrap">'; | |
dynamic_sidebar( 'before-content' ); | |
echo '</div></div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment