I want to show some short description in the All post_type
view of a custom post type in the WordPress Admin Dashboard.
For example:
For this custom post type, my shortcode is this
[shortcode]
.
Is there any way to show this before all posts?
1 Answer
The filter views_{$this->screen->id}
is fired just after the title of post edit screen has been print to screen, so it’s a safe place to just echo what you want.
So you can simply check here:
function post_type_desc( $views ){
printf('<h4>%s</h4>', __('Your description here.') ); // echo
return $views; // return original input unchanged
}
add_filter("views_edit-POST_TYPE_HERE", 'post_type_desc');
Replace your_post_type
here in POST_TYPE_HERE
.
Hope this will help you.