When someone reaches the end of your post, they’ve already given you something valuable: their attention. They read through your content and are now deciding what to do next.
An after-post widget lets you turn that moment into a deliberate next step instead of letting the visitors simply leave. We’ve used this approach on WPBeginner for years to get more email subscribers, increase our pageviews, and grow our sales.
In this guide, we’ll show you how to easily add custom after-post widgets in WordPress, step by step.

Example of a Custom After Post Widgets in WordPress
You can add just about anything to your after post widget including a call-to-action to join your email list, a related articles block to boost your pageviews, or even a product banner or discount to increase your sales.

Here are two easy ways to add a custom after-post widget to any WordPress theme.
Method 1. Add After Post Content Using a Plugin
The Add Widget After Content plugin adds a dedicated widget area right after your post content, and it works with any WordPress theme, classic or block.
Install and activate it to get started. You can follow our guide on installing a WordPress plugin if you need help. Once it’s active, go to Appearance » Widgets.
On a classic theme, this screen already exists, and the plugin adds an After Content area to it. On a block theme, WordPress normally doesn’t show the Widgets screen, so the plugin adds it along with the new ‘After Content’ area.

Click the plus icon inside that block to add any widget you want. We added a newsletter signup form, which was built with the WPForms plugin for this tutorial.
Feel free to configure the newly added widget and then click the ‘Update’ button to save your changes.
By default, the plugin shows your after-post widgets on every post and page. If you don’t want them to appear in certain places, you can exclude entire categories or post types from the widget area.
Simply go to Appearance » Widget After Content, choose the categories or post types where you don’t want the widget area to appear, and click ‘Save Changes’.

You can also hide the widget area on individual posts or pages.
To do this, open the post or page you want to exclude and scroll down to the ‘Widget After Content’ meta box. Select the checkbox next to ‘Remove widget after content for this post.’ and then update your post.

Now visit your website and open any post where you configured to show the widget, and you’ll see it appear right below the post content.

Method 2. Add Content After Posts Using Custom Code
If you’re comfortable adding code, you can customize exactly what appears after your posts instead of using a widget’s built-in layout.
However, the smallest mistake while adding code to your theme files can break your site.
We recommend using the free WPCode plugin to add and manage the snippet safely. If you need help, see our tutorial on how to install a WordPress plugin.
Once the WPCode plugin is active, go to Code Snippets » + Add Snippet and choose the ‘Add Your Custom Code (New Snippet)’ option.

On the new screen, select ‘PHP Snippet’ as the code type. Then, give the snippet a name and copy the following code into it.
function wpb_add_content_after_post( $content ) {
if ( is_single() && in_the_loop() && is_main_query() ) {
$custom_content = '<div class="wpb-after-post-content">';
$custom_content .= '<h4>Enjoyed This Post?</h4>';
$custom_content .= '<p>Sign up for our <a href="https://example.com/newsletter/">newsletter</a> to get more tips like this.</p>';
$custom_content .= '</div>';
$content .= $custom_content;
}
return $content;
}
add_filter( 'the_content', 'wpb_add_content_after_post' );
The is_single() check limits the content to individual posts, so the widget won’t appear on pages or archive listings. The rest of the snippet adds a heading, message, and newsletter link after the post content. Make sure to swap the example.com address for your own newsletter page before you set the snippet live.
Set the snippet to ‘Active’ and save it. Finally, visit a post on your site to see your custom content below the article.

Video Tutorial
If you’d prefer video instructions, then watch it.
After Post Widgets FAQs
What is the difference between a widget and a plugin?
A widget is a small block of content you can drop into a specific area of your site, like a sidebar, footer, or the after-content area covered in this guide.
A plugin adds new functionality to your entire site, and it’s often what gives you new widgets or widget areas to use in the first place.
How do I add a widget after a post in WordPress?
The easiest way is with the free Add Widget After Content plugin. It adds a widget area below your post content where you can add widgets such as a newsletter signup form or related posts.
Or you could add the same feature with a code snippet. We recommend using the free WPCode plugin so you don’t break your site accidentally with your snippet.
Why is my after-post widget not showing?
The most common cause is an exclusion in the plugin settings. Check whether you’ve hidden the widget on that specific post or page, or excluded its category or post type under Appearance » Widget After Content.
We hope this article helped you learn how to add custom after post widgets in WordPress. You may also want to see our tutorial on how to create a custom WordPress widget and our guide on best WordPress plugins.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Jiří Vaněk
This method is really great and helped me promote my Patreon. I took advantage of Optin Monster and placed a banner at the end of the article that encourages users to take action and join my Patreon. I didn’t have high expectations, but this campaign is working really well. So, these after-post widgets have significant potential and marketing power.
Laura Baareman
Hello!
I installed the Add Widget After Content plugin and It doesn’t appear in the Widget area of my Website backend. Any ideas on what to do?
WPBeginner Support
You would want to check with the support for the plugin and they should be able to take a look and assist.
Admin
Anil
Is there also a way to get widgets before post content after the title without it being arbitrary??
Mohit Chauhan
Thanks wpbeginner for this wonderful pick
WPBeginner Staff
Yes you can use plugins like widget logic and conditional widgets.
WPBeginner Staff
Thanks for writing and sharing this useful plugin with the community.
WPBeginner Staff
Yes, the plugin allows you to add custom after post widgets, hence the title.
Patty Jones
Our site has multiple authors. Can you customize the widget for each post as apposed to just disabling it?
Afromaster Hervé
is that title right ?
Arelthia Phillips
Thanks for featuring my plugin. I am glad that people find it useful.
Holger Govertz
I haven’t seen this plugin before, it fullfill the separation of style and function rule.
Maybe I should start adding widget areas this way, and not building child themes just for a widget area or two.