Insert a text to text editor automatically!

Have you any attention or remind words have to add for your readers. If you have this code will help you. Because this code/function automatically add the text which you entered with this code.

First one you will change your theme’s functions.php. make a backup please. After backup you can open and paste this code below;

Here is the code;

<?php
add_filter( 'default_content', 'my_editor_content' );
function my_editor_content( $content ) {
$content = "This is some custom content I'm adding to the post editor because I hate re-typing it.";
return $content;
}
?>

After you add this code to your functions.php, this code automatically add the text which you write.

That’s All. Have a nice day. Thanks to Justin Tadlock


If you enjoyed this post, make sure you subscribe to my RSS Feed
Comments are closed.