WordPress tutorial, In this article we will show, how to add common content after every wordpress post. We given simple code for adding in wordpress theme.
Just copy paste the following code in your functions.php file. You will find this file in your wordpress theme folder.
add common content after every wordpress post
function insert_common_content($_common_content) { if(!is_feed() && !is_home()) { $_common_content.= "<div class='wordpressapi'>"; $_common_content.= "<h4>Enjoyed this article?</h4>"; $_common_content.= "Check more articles on <a href='http://images.purabtech.in/'>purabtech.in/files/</a>"; $_common_content.= "</div>"; } return $_common_content; } add_filter ('the_content', 'insert_common_content');
Useful article related to this wordpress hack.
http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content