How to preset text in WordPress Post Editor ?

Share:
Share

This tutorial comes handy when you have a similar structure for writing your Post. Maybe you end or start with some exact lines and you probably hate writing them when you write a new post every time. Or this also works when you have guest authors or new authors. You can preset text in your WordPress editors with rules to write a Post or what tags are allowed, etc. Let’s see how’s it done.

We are not going to play with any WordPress Core files for this. All you have to do is Open the functions.php of your theme file and edit the code below.

<?php

add_filter( 'default_content', 'my_editor_content' );

function my_editor_content( $content ) {

	$content = "Dear Guest Poster,  Do not link to websites other than WPPanda or your own blog in this article. Thanks";

	return $content;
}

?>

The part from line no 4 is where you add your content, just replace it with “Dear Guest Poster..” and you are done presetting your text for Post-editor.

Well, that’s it. Leave a comment if you enjoyed reading the article or you have any issues or questions.

Share:
Share

Tags: ,

One Response to “How to preset text in WordPress Post Editor ?”

  1. Hami 03. Jan, 2010 at 10:42 pm #

    whoa ! iots quite easy to use man. :D Would implement it but tel me more about the Rule (setting filters) thing ..

    [Reply]

Leave a Reply

CommentLuv Enabled