Title: get_column_headers
Published: April 25, 2014
Last modified: February 24, 2026

---

# get_column_headers( string|WP_Screen $screen ): string[]

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#wp--skip-link--target)

Get the column headers for a screen

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#parameters)󠁿

 `$screen`string|[WP_Screen](https://developer.wordpress.org/reference/classes/wp_screen/)
required

The screen you want the headers for

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#return)󠁿

 string[] The column header labels keyed by column ID.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#source)󠁿

    ```php
    function get_column_headers( $screen ) {
    	static $column_headers = array();

    	if ( is_string( $screen ) ) {
    		$screen = convert_to_screen( $screen );
    	}

    	if ( ! isset( $column_headers[ $screen->id ] ) ) {
    		/**
    		 * Filters the column headers for a list table on a specific screen.
    		 *
    		 * The dynamic portion of the hook name, `$screen->id`, refers to the
    		 * ID of a specific screen. For example, the screen ID for the Posts
    		 * list table is edit-post, so the filter for that screen would be
    		 * manage_edit-post_columns.
    		 *
    		 * @since 3.0.0
    		 *
    		 * @param string[] $columns The column header labels keyed by column ID.
    		 */
    		$column_headers[ $screen->id ] = apply_filters( "manage_{$screen->id}_columns", array() );
    	}

    	return $column_headers[ $screen->id ];
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/screen.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/screen.php#L17)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/screen.php#L17-L41)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#hooks)󠁿

 [apply_filters( “manage_{$screen->id}_columns”, string[] $columns )](https://developer.wordpress.org/reference/hooks/manage_screen-id_columns/)

Filters the column headers for a list table on a specific screen.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#related)󠁿

| Uses | Description | 
| [convert_to_screen()](https://developer.wordpress.org/reference/functions/convert_to_screen/)`wp-admin/includes/template.php` |

Converts a screen string to a screen object.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [WP_Screen::render_list_table_columns_preferences()](https://developer.wordpress.org/reference/classes/wp_screen/render_list_table_columns_preferences/)`wp-admin/includes/class-wp-screen.php` |

Renders the list table columns preferences.

  | 
| [WP_List_Table::get_primary_column_name()](https://developer.wordpress.org/reference/classes/wp_list_table/get_primary_column_name/)`wp-admin/includes/class-wp-list-table.php` |

Gets the name of the primary column.

  | 
| [WP_Screen::show_screen_options()](https://developer.wordpress.org/reference/classes/wp_screen/show_screen_options/)`wp-admin/includes/class-wp-screen.php` |  | 
| [WP_List_Table::get_column_info()](https://developer.wordpress.org/reference/classes/wp_list_table/get_column_info/)`wp-admin/includes/class-wp-list-table.php` |

Gets a list of all, hidden, and sortable columns, with filter applied.

  | 
| [_WP_List_Table_Compat::get_column_info()](https://developer.wordpress.org/reference/classes/_wp_list_table_compat/get_column_info/)`wp-admin/includes/class-wp-list-table-compat.php` |

Gets a list of all, hidden, and sortable columns.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/get_column_headers/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_column_headers%2F)
before being able to contribute a note or feedback.