Skip to content

Instantly share code, notes, and snippets.

@palimadra
Created April 28, 2012 11:28
Show Gist options
  • Save palimadra/2518155 to your computer and use it in GitHub Desktop.
Save palimadra/2518155 to your computer and use it in GitHub Desktop.
Automatically insert text into WordPress posts (all of them)
<!-- add this piece of code to the functions.php file -->
add_filter( 'default_content', 'my_editor_content' );
function my_editor_content( $content ) {
$content = "I want this text to be automatically included.";
return $content;
}
?>
<!-- Thanks WPrecipies.com -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment