WordPress.org

Ready to get started?Download WordPress

Forums

Help on presetting HTML content in the editor with function filter (2 posts)

  1. Jaya
    Member
    Posted 3 years ago #

    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!

  2. Jaya
    Member
    Posted 3 years ago #

    Anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.