How to Add a Custom Widget After Post Content In Genesis Theme

It is actually very useful to add a custom widget after post content in Genesis Theme. You can place your Opt-in box, banner ads, promotional ads, etc. sky is limit. The Opt-in rate tends to be higher if you have the box just right after the content, because if readers are down way there, it usually means articles are interesting, and very likely they will Opt-in.

Of course, you can place the Opt-in codes manually post by post. Lol, I know it will be tedious to do that. That is why you are reading this post and want to create a custom widget, so can make your life easier. In Genesis theme, there are many places you can actually create custom widgets. Few days ago, I just wrote an article how to create a custom widget below the menu in Genesis theme, you can check it out if you are interested in that as well.

Anyhow, as I have said that area is very good for Opt-in box. But first, before making any change in your theme, you should always backup your theme first, and always have ftp and cpanel login information ready because you never know something might go wrong. Now, to create a custom widget after post content, first you login to wp-admin, and then go to Apppearance -> editor, click on function.php

and then copy and paste the below code right after the <?php:

genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'custom-theme' ),
'description' => __( 'This is the newsletter section.', 'custom-theme' ),
) );

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">',
) );

After that is done, and click save.

Now, if you follow the instruction correctly, when you go to Appearance -> widget, you should see a newly created widget area call “Newsletter”. There you can place your Opt-in codes, banner ads, adsense, etc.

Hopefully, this short tutorial is clear enough for anyone to follow. As always, leave a comment if you think it helps you, share it if you think it is useful.

Feng :Founder of Siteber: a full-stack web developer with more than 8 years working experience in WordPress, SEO, and internet marketing.