Prefill Text Editor Only for Specific Post Type (1 post)

  1. jpmclaughlin
    Posted 5 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic