Skip to content

Instantly share code, notes, and snippets.

@kraftbj
Last active December 14, 2015 13:38
Show Gist options
  • Save kraftbj/5094618 to your computer and use it in GitHub Desktop.
Save kraftbj/5094618 to your computer and use it in GitHub Desktop.
<?php
// Register newsletter widget area
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'custom-theme' ),
'description' => __( 'This is the newsletter section.', 'custom-theme' ),
) );
// Add the newsletter widget after the post content
add_action( 'genesis_after_post_content', 'custom_add_newsletter_box' );
function custom_add_newsletter_box() {
if ( is_singular( array( 'post', 'page' ) ) )
genesis_widget_area( 'newsletter', array(
'before' => '<div id="newsletter">',
) );
}
/*
Newsletter
------------------------------------------------------------ */
#newsletter {
background-color: #222;
color: #fff;
line-height: 1.5;
padding: 32px;
padding: 2rem;
text-align: center;
}
#newsletter p {
margin-bottom: 24px;
margin-bottom: 1.5rem;
}
#newsletter input {
width: 50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment