Last active
December 14, 2015 13:38
-
-
Save kraftbj/5094618 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
<?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">', | |
) ); | |
} |
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
/* | |
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