Created
March 14, 2013 07:32
-
-
Save vividvilla/5159509 to your computer and use it in GitHub Desktop.
How to add Newsletter Widget below the content in Genesis Child Themes
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
// 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