X

Custom post content

Adding this to your functions.php file in your wordpress theme will add content after each post. This can be something like a copyright or ad etc.


function add_post_content($content) {
	if(!is_feed() && !is_home()) {
		$content .= '<p>This article is copyright © '.date('Y').' '.bloginfo('name').'</p>';
	}
	return $content;
}
add_filter('the_content', 'add_post_content');

Comments  Leave a Reply

  1. Tweets that mention Wordpress Custom post content – wpsnipp.com Wordpress code snippets for your blog -- Topsy.com November 2, 2010 at 7:41 pm

    […] This post was mentioned on Twitter by Sabri Razin , WPSNIPP. WPSNIPP said: #wordpress Custom post content http://bit.ly/9aiYkn #tips #help #blog […]

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!