Last active
December 27, 2015 16:09
-
-
Save nutsandbolts/7352992 to your computer and use it in GitHub Desktop.
Add a widget area to the bottom of single posts (Genesis - XHTML - functions.php)
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
// Add the newsletter widget after the post content | |
add_action( 'genesis_after_post_content', 'nabm_add_newsletter_box' ); | |
function nabm_add_newsletter_box() { | |
if ( is_singular( 'post' ) ) | |
genesis_widget_area( 'newsletter', array( | |
'before' => '<div id="newsletter">', | |
) ); | |
} | |
genesis_register_sidebar( array( | |
'id' => 'newsletter', | |
'name' => __( 'Newsletter', 'nabm' ), | |
'description' => __( 'This is the newsletter section.', 'nabm' ), | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment