Created
October 6, 2013 01:17
-
-
Save braddalton/90943b4f5231ab6cfb18 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 widget areas | |
genesis_register_sidebar( array( | |
'id' => 'before-loop', | |
'name' => __( 'Before Single Post Loop, '$text_domain' ), | |
'description' => __( 'Adds a Widget Area Before Single Posts', '$text_domain' ), | |
) ); | |
add_action( 'genesis_before_loop', 'before_loop_widget' ); | |
function before_loop_widget() { | |
if ( is_single() && is_active_sidebar('before-loop') || !is_404() ) { | |
genesis_widget_area( 'before-loop', array( | |
'before' => '<div class="before-loop" class="widget-area">', | |
'after' => '</div>', | |
) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment