Hey there, Ashley! Question for you – how would one put a subscription box below one’s posts in WordPress like what you have on Nose Graze? Is there a plugin or something to install? Thanks! π
Hi there! π Adding an opt-in form below your posts is an excellent idea. I’m in the process of compiling statistics that compares the signup rate for my sidebar form versus the signup rate for my form below the posts, but so far it’s neck and neck. At the very least, my data shows that people do use my below post opt-in regularly, so that means it’s worth having!
I coded mine in manually
My opt-in form isn’t part of a plugin; it’s something that I coded into my custom theme. But that doesn’t mean it’s not possible for you to implement this, it just means you have to find another way.
Using Tweak Me v2?
If you’re using the Tweak Me v2 theme, then you’re in luck! It’s super easy to add an opt-in form to your theme. Tweak Me v2 comes with a “below posts” hook. If you navigate to Appearance » Theme Options and click on the “Hooks” tab. That’s where you’ll find a bunch of different text boxes you can use to insert content in specific areas. And one of those boxes is “Below Posts Hook”. That’s where you can place your email opt-in form code!
For more specific instructions, read the Tweak Me v2 documentation on adding an opt-in form. Here’s an example of what it looks like when you’re done:
Using a different theme? Try a plugin!
The beauty of WordPress is that there’s a plugin for everything, including opt-in boxes like this! Here are a few plugins you can try out:
Or, you can code it yourself.
If you want to code this directly into your theme, it’s pretty easy! You can add this code into your theme’s functions.php file:
function add_my_optin( $content ) { $post_type = get_post_type(); // Return the unfiltered content if we're not on a post. if ( $post_type != 'post' ) { return $content; } // If we're not on a single post page, bail. // You can remove this if you want the form to appear on your homepage too. if ( ! is_single() ) { return $content; } ob_start(); ?> <!-- Add your opt-in form code here! Example: --> <form> <input type="text" name="email" placeholder="Enter your email"> <input type="submit" name="submit" value="Subscribe"> </form> <?php // Add the opt-in form after the post content. return $content . ob_get_clean(); } add_filter( 'the_content', 'add_my_optin', 125 );
Oooh I just installed the Optin Forms plugin! π
Awesome, it looks great! π
I haven’t added an opt in form on my site yet. I’v read a lot recently about the value of building an email list. I guess that is something I should really focus on. Thanks for adding a couple of ways for those of us who don’t really write code to add an opt in. Those will be really helpful.
You definitely should! Especially if you have a blog. If you don’t have an option to subscribe via email, you’re cutting out a huge chunk of potential followers. There are some people (like me) who ONLY follow via email.
Sweet, I need to try this!
YOU ROCK Ashley!
I just added this, thanks π
I had no idea the Tweak Me themes had so many features! I swear I keep finding more and more!
Thanks Ashley, that was really helpful. I’ve added the Optin Forms and I’m really pleased with it.
Thanks for sharing Ashley! Will definitely check them out. π
Great tip! I’m definitely saving this post to refer to later. I’m too tired tonight to look into the plug ins right now! I have Tweak Me 2, but I’m not using it yet π Thanks!
Oo thanks so much for great blogging advice as usual Ashley! I downloaded Optin forms and it was really easy to set up! The one thing is that I can’t edit the email link now that I’ve added it and I’m not sure I put the right thing in for Mail Chimp, sigh. It leads them to the Mail Chimp sign up page though so it isn’t horrible, ha.
Very cool! I include the follow on bloglovin link on all my posts, but I hadn’t thought about doing this! Awesome tips, as always Ashley!
Wow! I got this going tonight but didn’t mean to. π I finally got an email set up through Mail Chimp. It’s great that there is so much customization on the free accounts but goodness it took me some time. π So glad I got around to it. Thanks for sharing this!
Okay, but how do I get the widget under my posts if I’m not using Tweak Me 2…? I’m using Chloe, and I don’t see where…I’m confused. #lol
Chloe doesn’t have a built in option for that, so I suggest you look at the plugins I recommended for use with other themes. π
Okay. I’m already using a plugin that meshes with MailPoet, and liked the demo for those newsletters since they’re all in Wp vs on an external site, and it doesn’t look like the other two have that service, hence my question. I suppose I could switch plugins if necessary, though. I really want that sign up form at the bottom of my posts! π
It’s still possible to insert a form like that with MailPoet, it would just require custom coding—possibly a custom plugin.
Okay. Hmm. Is that something you offer to your clients? Custom coding for their Creative Whimsy theme, or custom plugins…? I only recently discovered you and became a customer, so I’m not sure what all you offer, yet. π
Does MailPoet have a shortcode you can use to insert a signup form?
And just to clarify, if they do have a shortcode then I could create this for you, but it isn’t included for free as a customer. It’s something I’d have to charge to create. π
I’m not sure. Trying to find out… If there is, what would you charge me? I totally understand about that; not a problem.
Once you find out, send me an email and we can discuss pricing. π
Will do! It may be a while; I’m desperately trying to just get my darn blogs functional as I’m now past my deadline for relaunch. Stuff just won’t stop coming up. #annoyed I’m aiming for pretty and functional at the moment; once I’m back online and moving, and have a budge, I’ll be in touch with a few questions. Thanks! β₯
Ashley, Will my theme accept this code?
Yep this code will work for any theme. π
Hi Ashley! Thank you so much for all your incredible tips!
I am building my portfolio/blog since I am an advertising/pr & graphic design major, I am a little concerned because I posted the code:
function add_my_optin( $content ) {
$post_type = get_post_type();
// Return the unfiltered content if we’re not on a post.
if ( $post_type != ‘post’ ) {
return $content;
}
ob_start();
?>
<?php
// Add the opt-in form after the post content.
return $content . ob_get_clean();
}
add_filter( 'the_content', 'add_my_optin', 125 );
And now my website is missing! π
Did I mess up? What did I do? I can't even access the wp-admin site…
Either you have invalid characters in your code or you pasted it in the wrong place. π Pasting PHP code in the wrong place can result in a syntax error on your site. It’s easily fixed—you just have to remove the code you added via FTP or your host’s file manager.
Thank you so much! I fixed it. You are great, dear. Thanks for all your awersome tips!!!!
I installed Optin Forms but it doesn’t seem to support Feedburner. Am I wrong? I don’t know how to work the email solutions part.
It’s not listed as one of their supported services. Here’s the list from the plugins page:
AWeber
iContact
MailChimp
GetResponse
MadMimi
Interspire Email Marketer
Hi Ashley,
This is brilliant and really helpful. One question though, is there a way to only show it on the blog itself? At the moment, the optin is showing at the bottom of each blog item on the main blog page (see here for an example on the testing site: http://astro-shrink.thedesignpeople.com.au/blog/ ). I really only want it to show at the bottom of the actual blog article page (eg like here: http://astro-shrink.thedesignpeople.com.au/capricorn-high-achiever-procrastinator/ )
Thanks for your help!
Hi Nic,
I added a new piece to the code if you want to take a look and add that in. Look for this new section I added:
nice,
I want a awesome feedburner email subscriber box below post for wordpress
thanks
Thank you so much for suggesting Optin Forms. It’s exactly what I needed!
Awsome! Thank you so much.
Hi Ashley,
thank you so much for sharing your wisdom! I started my own blog 4 weeks ago and you give me very good advice here. And my US and UK Version is coming out soon.β¨β¨??