The code from ThinkVitamin is right. I think the problem came from else where in your code.
Actually, the hook manage_edit-${post_type}_columns
takes an argument $columns
which is an array of all registered columns. To add a new column, just add a new element to this array, like this:
add_filter('manage_edit-film_columns', 'my_columns');
function my_columns($columns) {
$columns['views'] = 'Views';
return $columns;
}
Related Posts:
- 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?
- Add “Last Edited by” column to custom post type list table
- Is it OK to move admin menu items?
- Custom admin columns for ALL custom post types
- Add custom column to custom post type overview in backend
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- How to add post_author column to custom post type
- How to show custom (checkbox) field value in admin post list?
- WordPress User Roles, Custom Post Types, and Admin views
- Adding menu_order to CPT admin page
- Custom post admin filtering by post meta (the date)
- Admin Column Text Positioning
- How to customize admin posts based on the user who is logged in
- Remove rows in the manage post/page view
- Adding HTML tags or css classes to admin columns
- Selecting a post in Dashboard
- Custom admin post.php page
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- CPT Columns doesn’t show categories
- Sorting custom post types in edit.php : Post disappear
- Add Content Column to Custom Post Type backend
- 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?
- Change column of row action (Quick Edit) links in WP_List_Table
- How to set up a private custom post type that is accessible in the administrative dashboard?
- Tracking changes in admin-page so user gets warning when leaving the page
- Possibilities for the edit.php admin panel? [closed]
- No Permission to add new Page, Post or CPT with Admin role
- Filter hierarchical custom post type admin page by parent, and include children & grandchildren
- Admin Filter – Add Post Type Description on Post Type Page
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- WP-ADMIN – Listing all CPT in “posts” listing
- Admin Column does not populate with data
- manage_edit-{post_type}_sortable_columns sorts, but wrong!
- Order a custom post type admin screen by a second custom post type title
- Filtering posts list table
- CPT Validation to not show “Post updated.”
- Edit Custom Post Type on Custom Admin Page instead Post Admin
- Custom Postype specific changes in admin panel
- WordPress make Grandparent and great grandparent filterable in custom columns
- Grouping of CPTs and taxonomies into menu groups in admin
- It’s possible to hide body copy box for a custom post type?
- Custom post type isn’t working
- Show data from one Custom Post Type in another Custom Post Type
- Add a custom text to admin footer in a Custom Post Type page
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- Add a ‘guide’ image to custom post type admin page
- Creat new admin url for custom post type
- Custom Field values not Showing in Edit Page of Custom Post Type
- WordPress custom post type capabilities issue
- Set thumbnail and title for a post type archive (not post itself!)
- Use remove_meta_box conditionally on custom post type
- New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?
- Custom columns doesn’t appear in custom post type
- How can I use this code on a custom database table?
- Custom WP_Query doesn’t display all posts
- How to group navigation items in the admin panel
- Sortable column containing numeric values for Custom Post Type at WordPress Backend
- Problem with $post_id object’s property
- Pods CMS: How to add custom column to Adnvanced Content Type
- How to check if post/page or taxonomy post is published by admin
- Linking to Post Types from wp-admin
- Plugin or method of allowing user to rearrange custom post types with drag and drop?
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- Insert Custom Post Types
- Create field of Custom Post Types
- sortable columns for multiple custom post types not working
- Custom Post Type – Support “author” only for admins
- Getting post attchment URL to populate a CPT Admin Page Column
- Showing User’s Post Counts by Custom Post Type in the Author.php?
- Custom posts of one type have disappeared from admin. Still appear on site [closed]
- How to get the custom post list to admin user edit page?
- Copy order items with metadata between orders – Woocommerce
- Change link for “add new” buttons on custom post type
- Add ‘page template’ column to dashboard for CPTs
- Custom Columns for Custom Post Type Manager
- Custom Post Type – Portfolio no longer works
- How do I edit the WordPress post.php file?
- Filter posts of custom post type by meta key in (List All Section)
- Make a custom column sortable by a value from a different custom post type
- Add data to post edit page, when post is published
- Custom capabilities not reflecting on admin panel
- get_post_types not working properly in admin
- How to limit what Editors see in the admin?
- Multiple wp_editor instances in custom post type using Ajax
- Questions regarding add_meta_box()
- Change Post Meta via AJAX from the posts list table
- Is there a hook between clicking on “Add new” and the edit screen of a new post?
- Custom Attachment Type
- 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
- How to customize `Edit-Post` Screen
- Multiple custom post types on same admin page
- Sort by post word count in admin area
- using the loop in custom meta is messing up ‘add new’ post type
- WordPress admin for a custom post, hide/collapse the main “title” and “description” boxes
- Custom sortable column with WPAlchemy
- How to display magic field’s custom write panel in wordpress theme?
- Remove filter and view options from custom post type edit screen