I'm trying to remove the columns thumbnail and featured from an admin table. At the same time I'm adding one additional column. The post type is property
. I would like to do it via code instead of using plugin as I would need to do some additional customisations.
None of the hooks I tried seem to work.
- manage_property_posts_columns
- manage_posts_columns
- manage_property_posts_custom_column
Interesting thing is that the same code works on different post types.
What could be the issue?
add_filter( 'manage_property_posts_columns', 'remove_property_columns' );
function remove_property_columns( $columns ) {
unset($columns['thumbnail']);
unset($columns['featured']);
$columns['test'] = 'Test' ;
return $columns;
}