Last active
December 15, 2015 02:48
-
-
Save braddalton/5189432 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
// Register custom widget | |
genesis_register_sidebar( array( | |
'id' => 'after-content', | |
'name' => __( 'After Post Content', 'child' ), | |
'description' => __( 'This widget executes after your single posts content.', 'child' ), | |
) ); | |
// Hook widget after single post content only | |
add_action( 'genesis_after_post_content', 'widget_after_content', 9 ); | |
function widget_after_content() { | |
if ( is_single() && is_active_sidebar( 'after-content' ) ) { | |
echo '<div class="after-content"><div class="wrap">'; | |
dynamic_sidebar( 'after-content' ); | |
echo '</div></div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment