Insert common content after every wordprss post

Sponsors

Just copy paste the following code in your functions.php file.  You will find this file in your wordpress theme folder.

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.wordpressapi.com/’>wordpressapi.com/files/</a>”;
$_common_content.= “</div>”;
}
return $_common_content;
}
add_filter (‘the_content’, ‘insert_common_content’);

wordpress-post
Useful article related to this wordpress hack.

http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content

You may like following Articles!

This entry was posted in wordpress, wordpress api and tagged by Wordpress API. Bookmark the permalink.

About Wordpress API

API means Application Program interface. In Wordpress API we are giving all the information about wordpress API. We worked for many wordpress plugins and themes. We have expertise in PHP, Databases, Graphic Design, Ruby on Rails, Java, Wordpress, Drupal and many CMS. We always give you the best solutions about wordpress and other related topics in This Blog. We will give you always fresh tips and tricks and techniques about wordpress in this blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>