• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Newsletter widget after post Genesis 2.0

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Newsletter widget after post Genesis 2.0

This topic is: not resolved
  • This topic has 16 replies, 5 voices, and was last updated 12 years, 4 months ago by kdmpublishing.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • August 16, 2013 at 9:31 am #56811
    Reginald
    Member

    Hi guys

    I have a question. I followed Brian's guide here: http://www.briangardner.com/email-newsletter-signup-box/

    I can see the signup box on widget screen but the email box doesn't show up on live page. I tested with different browsers (cleared cache too) but doesn't seem to work.

    I am using Genesis Sample and with Genesis 2.0 and HTML5.

    Do you have any idea what is wrong? Here's the link: http://www.reginaldchan.net/blogging-experience/

    Thank you.


    Website | Facebook | Twitter | Google+ | Editorial Sumo

    http://www.reginaldchan.net
    August 16, 2013 at 10:37 am #56830
    Brad Dalton
    Participant

    The code uses the old XHTML hooks so you need to replace:

    genesis_after_post_content
    

    With

    genesis_entry_footer
    

    Here's the working code with new HTML 5 hook

    //* 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_entry_footer', 'custom_add_newsletter_box', 5 );
    function custom_add_newsletter_box() {
    	if ( is_singular( 'post' ) )
    	genesis_widget_area( 'newsletter', array(
    		'before' => '<div id="newsletter">',
    	) );
    }
    

    You can change the 5 to 15 if you want to move the box below the post meta.


    Tutorials for StudioPress Themes.

    August 16, 2013 at 11:59 am #56847
    Reginald
    Member

    Hi Brad,

    Thanks for that. I have another 'stupid' question I hope you don't mind.

    What happens if I want to add another widget area below the newsletter box (above) but above the author box?

    Which part should I amend the code?

    Thank you so much for your assistance.


    Website | Facebook | Twitter | Google+ | Editorial Sumo

    August 16, 2013 at 12:04 pm #56848
    Brad Dalton
    Participant

    The name of the function and a unique i.d:

    //* Register newsletter widget area
    genesis_register_sidebar( array(
        'id'        => 'custom',
        'name'      => __( 'New Widget', 'custom-theme' ),
        'description'   => __( 'This is the new widget section.', 'custom-theme' ),
    ) );
     
    //* Add the newsletter widget after the post content
    add_action( 'genesis_entry_footer', 'custom_widget_box', 8 );
    function custom_widget_box() {
        if ( is_singular( 'post' ) )
        genesis_widget_area( 'custom', array(
            'before' => '<div id="custom">',
        ) );
    }
    

    Tutorials for StudioPress Themes.

    August 16, 2013 at 2:52 pm #56895
    Jenny
    Member

    Yay thank you for this. I finally got my related posts widget fixed *hugs*

    August 16, 2013 at 3:06 pm #56902
    Brad Dalton
    Participant

    No worries Jenny.


    Tutorials for StudioPress Themes.

    August 16, 2013 at 7:31 pm #56951
    Reginald
    Member

    Hey Brad,

    Thanks for that! One question (another). How to style the custom one?

    The newsletter one is:
    /*
    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%;
    }

    I can't just change #newsletter to #custom right?

    Sorry if my question is a little misleading 🙂


    Website | Facebook | Twitter | Google+ | Editorial Sumo

    August 16, 2013 at 7:48 pm #56953
    Brad Dalton
    Participant

    You can use the same class to style both.

    This way you don't need to duplicate the CSS.

    Or you can duplicate and modify the CSS and use the new class .


    Tutorials for StudioPress Themes.

    August 16, 2013 at 7:55 pm #56955
    Reginald
    Member

    Hi Brad

    Thanks for your quick reply.

    So I assume the class is newsletter and custom?

    Being said that (assuming it is correct), how can I style them both using the same css?

    Is it set as #newsletter #custom ?

    Again, I might sound stupid so, please bear with me 🙂 Haha!


    Website | Facebook | Twitter | Google+ | Editorial Sumo

    August 16, 2013 at 8:15 pm #56960
    Brad Dalton
    Participant

    The CSS is already included in the style sheet for the newsletter selector so you can use it in your custom widget.

    No need to add any more CSS.

    Change this:

    <div id="custom"
    

    To this in the code above

    <div id="newsletter"
    

    So here's the code now:

    //* Register newsletter widget area
    genesis_register_sidebar( array(
        'id'        => 'custom',
        'name'      => __( 'New Widget', 'custom-theme' ),
        'description'   => __( 'This is the new widget section.', 'custom-theme' ),
    ) );
      
    //* Add the newsletter widget after the post content
    add_action( 'genesis_entry_footer', 'custom_widget_box', 8 );
    function custom_widget_box() {
        if ( is_singular( 'post' ) )
        genesis_widget_area( 'custom', array(
            'before' => '<div id="newsletter">',
        ) );
    }
    

    Tutorials for StudioPress Themes.

    August 16, 2013 at 8:25 pm #56963
    Reginald
    Member

    Hey mate!

    Thanks for that.

    Looks good. If I want to place it after post meta,

    I just change this:

    add_action( 'genesis_entry_footer', 'custom_widget_box', 8 );

    to

    add_action( 'genesis_entry_footer', 'custom_widget_box', 15 );

    right?


    Website | Facebook | Twitter | Google+ | Editorial Sumo

    August 16, 2013 at 8:31 pm #56967
    Brad Dalton
    Participant

    Spot on.


    Tutorials for StudioPress Themes.

    August 25, 2013 at 1:30 pm #58748
    [email protected]
    Member

    @Reginald: Thank you for posting this coding issue as I was experiencing the very exact problem.

    @Brad
    : You are awesome at what you do and very timely and prompt I might add. Thank you for the problem solving response(s).

    August 25, 2013 at 3:08 pm #58770
    Brad Dalton
    Participant

    You're welcome Arnold.


    Tutorials for StudioPress Themes.

    September 4, 2013 at 9:29 am #60636
    kdmpublishing
    Member

    @braddalton, thank you for posting this fix. I was wondering why the code worked on my other sites that have themes that are not upgraded for html 5 and why it wouldn't work on my site with the Epik Theme which is upgraded. Tried to add in the code a bunch of times, and couldn't figure out why it didn't work. I will keep both copies of the code depending on the studio press theme I have.

    Thanks again

    September 4, 2013 at 9:45 am #60644
    Brad Dalton
    Participant

    @kdmpublishing Please send me a copy of your theme files and i'll test it. I do own that theme but maybe the new version is slightly different. [email protected]


    Tutorials for StudioPress Themes.

    September 4, 2013 at 11:40 am #60677
    kdmpublishing
    Member

    Once I added in the updated code that you provided for the functions.php it worked fine. I set it up on my main site that uses the epik theme (v1.3) (see an example here http://wpclientsatisfaction.com/tips-plugin-developers/) and it worked. Now when I originally tried with the code on Brian's page, it didn't work on the Epik updated version.

    Brian's code did however, work on the site that I use the Fabricated theme since that is not updated for html 5 (see example here http://quickstartminisites.com/home-decorating-niche-minisite/)

    If you still need me to send you the functions file for Epik, sure just let me know.

    Donesia Muhammad (kdmpublishing)

  • Author
    Posts
Viewing 17 posts - 1 through 17 (of 17 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble