If you want to add some content automatically after each post on your WordPress blog/website, then keep your close attention in this post as I am going to share how to insert content automatically after each post in WordPress.
Copy the below code and paste it at the end of the functions.php file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <?php /* * insert content automatically after each post */ function insertFootNote($content) { if(!is_feed() && !is_home()) { $content.= "<div class='subscribe'>"; $content.= "<h4>Enjoyed this article?</h4>"; $content.= "<p>Subscribe to our RSS feed and never miss a single tutorial!</p>"; $content.= "</div>"; } return $content; } add_filter ('the_content', 'insertFootNote'); ?> |
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: woocommerce plugin wordpress tutorial, wordpress snippet, wordpress snippets, wordpress tutorial, wordpress tutorial for beginner, wordpress tutorial for beginners