custom post types - Issue removing columns from admin table

I'm trying to remove the columns thumbnail and featured from an admin table. At the same time I'm adding one a

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;
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744903156a4600097.html

相关推荐

  • custom post types - Issue removing columns from admin table

    I'm trying to remove the columns thumbnail and featured from an admin table. At the same time I'm adding one a

    1天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信