Thanks to TomJNowell‘s help, this would be a possible working solution:
$supports = array(
'title',
'editor'
);
if(current_user_can('delete_plugins')){
$supports[] = 'author';
}
register_post_type('whatever',
array(
'labels' => array(
'name' => 'Whatever',
'singular_name' => 'Whatever'
),
'supports' => $supports,
....
Related Posts:
- Load a script just to custom post type in admin
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- Merge two custom post types into one admin page?
- Remove the “View” Link in Post Admin
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Add “Last Edited by” column to custom post type list table
- Filter custom post types in admin not working
- Custom post type admin search
- Ordering posts by custom taxonomy in admin area
- Create a dropdown with Custom Post Types as option in admin
- How to add custom columns to Custom Post Type admin screen
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Is it OK to move admin menu items?
- Prevent reload confirmation after AJAX save
- Filter by custom Field for Custom post type Admin Listing
- jQuery UI in Admin (Best Practice?)
- Admin Post Update Redirection to Posts Screen
- Exclude add_filter from the admin
- Renaming Menu Item within Admin Menu Section for a Custom Post Type?
- Custom Post type sort order not working in the admin area
- Custom admin columns for ALL custom post types
- Add custom column to custom post type overview in backend
- Unable to filter on field on edit.php page
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- No results searching custom post type in admin panel
- How to add post_author column to custom post type
- Adding help information to custom post edit page
- Only Show an Author Their Custom Post Types
- Actions that Run on Admin Edit Page Load After Posts Are Queried
- Custom Post Type and taxonomies’s labels localization not working
- How can I add a column in the wp_list_table of the admin area?
- Show admin help message across custom post type parent and child posts
- How to show custom (checkbox) field value in admin post list?
- How to search CPT’s by meta query from the admin dashboard?
- Add theme options to custom post type admin pages [closed]
- Using WPAlchemy metabox values in another metabox
- Custom post admin filtering by post meta (the date)
- Admin Column Text Positioning
- Add text to wordpress admin ‘Add Post’ edit
- Sort admin area by custom Event Date field
- How can I change the title of an Add New page in Admin for custom post type
- How to customize admin posts based on the user who is logged in
- Set a default category – if the user didn’t select one- before creating a post
- How can I create a custom meta box to add an mp4 video to a page?
- How to only show posts assigned to current user, only in certain post types
- Add acf field in title (admin table)
- Adding HTML tags or css classes to admin columns
- Create a page that will be used to create a custom post type
- Customize my custom taxonomy table in Admin panel
- Get parse_query filter to return slug instead of id
- Custom Post Type Nav to Subpage
- Selecting a post in Dashboard
- Custom admin post.php page
- A simple script to allow sorting of custom posts in admin?
- Notify admin on new submit
- Options page – dropdown of users
- No Permission to add new Page, Post or CPT with Admin role
- Admin Column does not populate with data
- Filtering posts list table
- CPT Validation to not show “Post updated.”
- Custom post type isn’t working
- Use remove_meta_box conditionally on custom post type
- How to group navigation items in the admin panel
- Sortable column containing numeric values for Custom Post Type at WordPress Backend
- How to check if post/page or taxonomy post is published by admin
- CPT Columns doesn’t show categories
- Insert Custom Post Types
- Showing User’s Post Counts by Custom Post Type in the Author.php?
- Add ‘page template’ column to dashboard for CPTs
- Filter posts of custom post type by meta key in (List All Section)
- get_post_types not working properly in admin
- Require custom post type if is_admin() – template doesn’t show up?
- Function to add custom HTML into head in custom post-type list page
- Multiple custom post types on same admin page
- using the loop in custom meta is messing up ‘add new’ post type
- Metaboxes inside Tab
- How can I put content before my custom post type default pages?
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Is there any filter to add a custom attribute to the tag in admin panel?
- How to hide private posts even if user is admin
- Adding orderby url parameter to main CPT admin menu link
- Help Adding filter to Add Media button for custom post type
- Delete all custom posts then upload a new CSV of events
- Pagination in wp-admin for CPT
- Create an administation subpage containing posts in a certain category
- Custom post type doesn’t display on admin list
- Customising the admin columns for a custom post type, but now most of the built in categories don’t display?
- Shared Custom post type between WP network sites
- Admin menu post type
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- Redirect preview single post link to a page
- Custom Post Type Causing Admin Sidebar UI Issue
- How to change the default orderby from “Date” to e.g. “Title” or my custom column in content type records list in admin?
- Change column of row action (Quick Edit) links in WP_List_Table
- Collection of fields in a single post
- Prevent users from changing post status
- Custom Plugin w/ Custom Post Types – Custom Posts Are Showing at all Privilege Levels – Is this possible to adjust?
- Issue displaying multiple TinyMCE editors with WPAlchemy
- Admin menu link with variable