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
- Change the text on the Publish button
- Load a script just to custom post type in admin
- Row actions for custom post types?
- Register CPTs using Dashicons for admin menu icon in WP 3.8
- Replacing the title in admin list table
- Make custom column sortable
- Remove “posts” from admin but show a custom post
- Add content in custom post type page after the title and before columns
- How to check if I’m on a custom post type archive in the admin area
- how to group custom post types
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Add content before/after admin post wp-list-table
- Custom post type Admin Page
- jQuery UI in Admin (Best Practice?)
- Exclude add_filter from the admin
- order of date column in custom post type
- Displaying Post Title on Post Edit page?
- Backend search; include CPT meta?
- custom sortable column
- Make a custom column sortable, by custom post count
- Sort custom post types by last name in the backend
- How i add new link after Edit | Quick Edit | Trash | View in quick edit section
- Remove Post Page “View Post” Link
- Adding help information to custom post edit page
- How can I add a column in the wp_list_table of the admin area?
- Add text to post list/edit screens?
- How do I sort a custom post type admin column using two meta keys?
- Add Post Url to Manage Edit Screen
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- Sort admin area by custom Event Date field
- How to make post sticky in the admin page?
- How do increase the amount of links shown down the left in the admin menu?
- How to only show posts assigned to current user, only in certain post types
- Unable to retrieve any posts of CPT in wp-admin
- Create a page that will be used to create a custom post type
- Custom Post List View: Page or something else?
- A simple script to allow sorting of custom posts in admin?
- WP CPT Custom Sortable Column in Admin Dashboard Sort Order Random
- How to show first name and last name in custom post type columns
- Filter term taxonomy metabox in custom post type
- Options page – dropdown of users
- Addition of custom option panel crashes Media Library & Admin Area
- No Permission to add new Page, Post or CPT with Admin role
- manage_edit-{post_type}_sortable_columns sorts, but wrong!
- WordPress make Grandparent and great grandparent filterable in custom columns
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- WordPress custom post type capabilities issue
- How to group navigation items in the admin panel
- Pods CMS: How to add custom column to Adnvanced Content Type
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- Create field of Custom Post Types
- 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?
- Custom Columns for Custom Post Type Manager
- get_post_types not working properly in admin
- How to customize `Edit-Post` Screen
- Multiple custom post types on same admin page
- Remove filter and view options from custom post type edit screen
- jQuery UI & Admin (Calendar)
- Hide Published text from custom post types column
- Change Text in Admin Panel
- get_posts() returns empty on custom post type /wp-admin/edit.php
- Is there any filter to add a custom attribute to the tag in admin panel?
- Sort custom post column by generated value?
- Help Adding filter to Add Media button for custom post type
- Delete all custom posts then upload a new CSV of events
- How to override post-new.php with custom template
- Pagination in wp-admin for CPT
- Group based routing and administration
- Limit Number of Custom Post Type Dashboard
- Admin menu post type
- Filtering in admin broken for custom post type in 3.8.1?
- Split custom post list into two columns
- Prevent users from changing post status
- Admin menu link with variable