Skip to content

Instantly share code, notes, and snippets.

@vividvilla
Created March 14, 2013 07:32
Show Gist options
  • Save vividvilla/5159509 to your computer and use it in GitHub Desktop.
Save vividvilla/5159509 to your computer and use it in GitHub Desktop.
How to add Newsletter Widget below the content in Genesis Child Themes
// Code to register a 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( 'post' ) )
genesis_widget_area( 'newsletter', array(
'before' => '<div id="newsletter">',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment