Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using wordpress for my blog. My blog contains events details and in every post i want to start with "this information is exclusively provided by...." this statement and end with my "feedburner subscribe us box"

So what I am actually looking for is

<---My String--->
    MY Actual Post
<---My feedburner subscribe us code--->

this. Is there any plugin which can automatically add the common stuff to my post. Please help out.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Actually you don't need a plugin to do this. Just add a simple function to your functions.php file:

function my_content($content) {
  $content = 'My content before post' . $content . 'My content after post';
  return $content;
}
add_filter('the_content','my_content');

If you don't want additional content to appear in your feed, use following function:

if( !is_feed() ) {
  function my_content($content) {
    $content = 'My content before post' . $content . 'My content after post';
    return $content;
  }
  add_filter('the_content','my_content');
}
share|improve this answer
    
thnx Max for helping me out... :) –  amod0017 May 8 '12 at 12:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.