Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nutsandbolts/7352992 to your computer and use it in GitHub Desktop.
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)
// 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' ),
) );
/* Newsletter
------------------------------------------------------------ */
#newsletter {
background-color: #e2e2e2 !important;
color: #333;
line-height: 1.5;
padding: 20px;
padding: 2rem;
margin-top: 30px !important;
}
#newsletter p {
margin-bottom: 15px;
margin-bottom: 1.5rem;
}
#newsletter h4 {
color: #017172;
text-align: center;
}
#newsletter input {
width: 50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment