admin管理员组

文章数量:1391860

Here is a screenshot of the admin console pages I find here a description of the page on the title column (marked in RED), I would like to add such notes on pages I create or edit the ones already there. I can't find it on the edit screen or any other related editable part. Can anyone help me?

Here is a screenshot of the admin console pages I find here a description of the page on the title column (marked in RED), I would like to add such notes on pages I create or edit the ones already there. I can't find it on the edit screen or any other related editable part. Can anyone help me?

Share Improve this question edited Feb 7, 2020 at 9:44 Hector 6821 gold badge7 silver badges18 bronze badges asked Feb 7, 2020 at 5:39 rafiwrafiw 133 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Welcome! Those areas you have marked with a red border is called Post states.

In order to modify post states you can use display_post_states filter.

The following example adds the post id to states.

function my_custom_display_post_states( $states, $post ) {
    // Add post id.
    $states['my_custom_state'] = $post->ID;

    return $states;
}

add_filter( 'display_post_states', 'my_custom_display_post_states', 10, 2 );```

Please check WordPress documentation for more information.

本文标签: Admin pagesedit notes of the title of posts and pages