content top
How to add default content to your posts

How to add default content to your posts

If you have a need to add the same content to the end of every post, say for something such as letting visitors know of a new project etc, then this piece of code is for you.

Add the following to the functions.php file and change the text to suit your needs.

[php]add_filter( ‘default_content’, ‘my_editor_content’ );

function my_editor_content( $content ) {
$content = "Check out my new book at, on sale now at…";
return $content;
}[/php]

Leave a Reply

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