On this page
apply_filters( 'manage_posts_columns', string[] $post_columns, string $post_type )
Filters the columns displayed in the Posts list table.
Parameters
$post_columnsstring[]-
An associative array of column headings.
$post_typestring-
The post type slug.
More Information
manage_posts_columnsis a filter applied to the columns shown on the manage posts screen. It’s applied to posts of all types except pages. To add a custom column for pages, hook the manage_pages_columns filter. To add a custom column for specific custom post types, hook the manage_{$post_type}_posts_columns filter.- Built-in Column Types
Listed in order of appearance. By default, all columns supported by the post type are shown.- cb Checkbox for bulk actions.
- title Post title. Includes “edit”, “quick edit”, “trash” and “view” links. If $mode (set from $_REQUEST[‘mode’]) is ‘excerpt’, a post excerpt is included between the title and links.
- author Post author.
- categories Categories the post belongs to.
- tags Tags for the post.
- comments Number of pending comments.
- date The date and publish status of the post.
Source
File: wp-admin/includes/class-wp-posts-list-table.php. View all references
$posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
Related
Used By
| Used By | Description |
|---|---|
| WP_Posts_List_Table::get_columns() wp-admin/includes/class-wp-posts-list-table.php |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/manage_posts_columns