the_editor_content filter change the content of other textarea in wp admin in add/edit post section?

I have more then one text areas in wp admin in post add/edit section, i am trying to change the content of by default textarea of wp but when i execute the the_editor_content filter, it change the content of by default textarea but it also change the content of other textareas,is there any way to to change the content of only by default textarea?

Note* Other textareas have different ids

Read More

code i used :

add_filter( 'the_editor_content', 'my_editor_content' );
function my_editor_content() {
    global $post;
    return search_keywords($post->post_content, $keyword1,$keyword2,$keyword3);
}

Related posts

Leave a Reply

1 comment

  1. I think you need to hook into default_content like this

    add_filter( 'default_content', 'my_editor_content' );
    
    function my_editor_content( $content ) {
    
    $content = "This is my default content!";
    
    return $content;
    }