Using WordPress ‘manage_pages_columns’ PHP filter

The manage_pages_columns WordPress PHP Filter allows you to modify the columns displayed in the Pages list table in the WordPress admin area.

Usage

add_filter('manage_pages_columns', 'your_custom_function');
function your_custom_function($post_columns) {
    // your custom code here

    return $post_columns;
}

Parameters

  • $post_columns (string[]) – An associative array of column headings.

More information

See WordPress Developer Resources: manage_pages_columns

Examples

Remove Author Column

Remove the author column from the Pages list table.

add_filter('manage_pages_columns', 'remove_author_column');
function remove_author_column($post_columns) {
    unset($post_columns['author']);
    return $post_columns;
}

Add Word Count Column

Add a custom column displaying the word count for each page.

add_filter('manage_pages_columns', 'add_word_count_column');
function add_word_count_column($post_columns) {
    $post_columns['word_count'] = __('Word Count', 'textdomain');
    return $post_columns;
}

Change Title Column Header

Change the title column header text to “Page Name”.

add_filter('manage_pages_columns', 'change_title_column_header');
function change_title_column_header($post_columns) {
    $post_columns['title'] = __('Page Name', 'textdomain');
    return $post_columns;
}

Reorder Columns

Reorder the columns by moving the date column before the title column.

add_filter('manage_pages_columns', 'reorder_date_column');
function reorder_date_column($post_columns) {
    $date = $post_columns['date'];
    unset($post_columns['date']);
    $post_columns = array_slice($post_columns, 0, 2, true) +
                    array('date' => $date) +
                    array_slice($post_columns, 2, count($post_columns) - 1, true);
    return $post_columns;
}

Add Custom Column for Page Template

Display the page template used for each page in a custom column.

add_filter('manage_pages_columns', 'add_page_template_column');
function add_page_template_column($post_columns) {
    $post_columns['page_template'] = __('Page Template', 'textdomain');
    return $post_columns;
}