WordPress.org

Support

Support » How-To and Troubleshooting » Prefill Text Editor Only for Specific Post Type

Prefill Text Editor Only for Specific Post Type

  • I’ve found a way to set the default content for the text editor for all posts:

    add_filter( 'default_content', 'my_editor_content' );
    
    function my_editor_content( $str ) {
    	$str = "Enter <strong>description</strong> here.";
    	return $str;
    };

    However, I only want to use this filter for a custom post-type that I’ve created. Is there a way to register filters for only certain post-types?

  • The topic ‘Prefill Text Editor Only for Specific Post Type’ is closed to new replies.
Skip to toolbar