Posted By

GrfxGuru on 02/02/11


Tagged

post wordpress content automated


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

kirichev
hariom
acousins


Set default content for posts in WordPress editor


 / Published in: PHP
 

URL: http://www.catswhocode.com/blog/killer-hacks-to-enhance-wordpress-editor

Do you always insert the same text on all your posts, for example to tell people to subscribe to your rss feed? If yes, you should definitely set up WP to have it automatically inserted in the editor. Open your functions.php file, and paste this code. That’s all you need to do to define some default content.

  1. add_filter( 'default_content', 'my_editor_content' );
  2.  
  3. function my_editor_content( $content )
  4. {
  5. $content = "If you enjoyed this post, make sure to subscribe to my rss feed.";
  6. return $content;
  7. }

Report this snippet  

You need to login to post a comment.