Support » Plugins and Hacks » Hacks » Help on presetting HTML content in the editor with function filter

  • I was looking for ways to preset html content to the editor upon the creation of new posts. I’ve found many examples to how to do that for text but i wasn’t able to figure out how to do the same thing with html content. (ex: text + images). Here is the example I’ve found:

    add_filter( 'default_content', 'my_editor_content' );
    
    function my_editor_content( $content ) {
    
        $content = "my-preset-content-here";
    
        return $content;
    }

    Any help in the matter would be appreciated!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help on presetting HTML content in the editor with function filter’ is closed to new replies.