{"id":11510,"date":"2021-12-21T13:45:23","date_gmt":"2021-12-21T18:45:23","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=11510"},"modified":"2022-01-05T16:50:41","modified_gmt":"2022-01-05T21:50:41","slug":"automatically-add-content-after-posts","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/automatically-add-content-after-posts\/","title":{"rendered":"How to Automatically Add Content After Posts or Pages in WordPress"},"content":{"rendered":"\n
Have you ever wanted to automatically display standard content after each post or page in WordPress? Then you have come to the right tutorial. Here we will be showing you three general ways to automatically add content after posts or pages in your WordPress<\/a> site.<\/p>\n\n\n\n Some of the use cases for adding content after each post could be situations where you might want to add disclosures, signatures, custom ads, call to action, an email opt-in form, a set of links for your readers to follow, and more. WordPress does not come with a native method to automatically add content after posts or pages so we will have to use other WordPress features to accomplish this.<\/p>\n\n\n\n The first method will involve using a plugin<\/a> and generally ideal for site admins who have no experience with WordPress theme<\/a> development. The second method will use a WordPress filter and is more ideal for those who are not shy of delving into theme development.<\/p>\n\n\n\n The featured WordPress plugin that you can use for automatically adding content after posts is the ‘Add Widget After Content<\/strong>‘ plugin by Arelthia Phillips. It comes available free of charge in the WordPress plugin directory.<\/p>\n\n\n\n To get started, sign in to your site\u2019s admin area and then navigate to Plugins > Add New<\/strong> using the sidebar menu.<\/p>\n\n\n\n From the Add Plugins screen, Search for ‘Add Widget After Content<\/strong>‘.<\/p>\n\n\n\n From the results install and activate the plugin using the WordPress on-screen tools.<\/p>\n\n\n\n Once you have successfully completed the above steps it can then be configured from the settings screen on the Appearance menu.<\/p>\n\n\n\n By default, the widget will display on all posts but using the configuration options you can choose where you would like the widget to appear or not.<\/p>\n\n\n\n Once that is done you can head on over the Widgets page. The plugin adds a Widget area titled ‘After Content<\/strong>‘.<\/p>\n\n\n\n Any widgets that you add to this widget area, will be displayed under your posts or pages, depending on how you’ve configured the plugin.<\/p>\n\n\n\n You can disable the widget on individual posts on a case-by-case basis by simply checking the box on the Widget After Content meta box that is now displayed on the WordPress post editor screen.<\/p>\n\n\n\n You can stop reading if you are satisfied with using a plugin. For the more inquisitive or the more tech-savvy you can still add content after a post or page without using a plugin. We will now show you the two ways as opposed to the plugin method above that you can do that.<\/p>\n\n\n\n With this method, we will be making use of the built-in WordPress Filter. You can read more about what a WordPress Filter is here<\/a>. From the reference, you will see that WordPress comes with a long list of filters. In this case, we will be leveraging the Automatically Add Content After Posts in WordPress Using Plugin<\/h2>\n\n\n\n
Add Content After Posts Using WordPress functions.php<\/h2>\n\n\n\n
the_content<\/code> filter<\/a>. This filter is applied to the post or page content retrieved from the database, prior to printing on the screen. It is also used in the trackbacks operation.<\/p>\n\n\n\n