# Remove Columns From the Posts and Pages Lists

> Drops columns you never look at, like Comments or Tags, from the admin lists for a cleaner overview.

- Type: PHP
- Runs: Admin only
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: admin, columns, cleanup
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/remove-posts-list-columns/

## Code

```php
// Column keys to remove: author, categories, tags, comments, date.
$wpide_remove_post_columns = array( 'comments', 'tags' );
$wpide_remove_page_columns = array( 'comments' );

add_filter( 'manage_posts_columns', function ( $columns ) use ( $wpide_remove_post_columns ) {
    return array_diff_key( $columns, array_flip( $wpide_remove_post_columns ) );
} );

add_filter( 'manage_pages_columns', function ( $columns ) use ( $wpide_remove_page_columns ) {
    return array_diff_key( $columns, array_flip( $wpide_remove_page_columns ) );
} );
```

## Notes

manage_posts_columns also covers non-hierarchical custom post types.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove Columns From the Posts and Pages Lists" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
