admin管理员组

文章数量:1130349

I have created a custom post type by the name of Teams. Listing page looks like this

How can I change this highlighted title label?

Is there any hook for this that you know of?

I have created a custom post type by the name of Teams. Listing page looks like this

How can I change this highlighted title label?

Is there any hook for this that you know of?

Share Improve this question asked Oct 30, 2018 at 17:26 user9258337user9258337 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

The list_table_primary_column hook might be the one to go with, i.e:

add_filter('list_table_primary_column', 'teams_table_primary_column', 10, 2);

function teams_table_primary_column($colname, $screen_id) {
    if($screen_id == 'teams' && $colname == 'Title') {
        return "New column name";
    }
}

Note: this is completely untested, let me know how it goes!

Reference

I have created a custom post type by the name of Teams. Listing page looks like this

How can I change this highlighted title label?

Is there any hook for this that you know of?

I have created a custom post type by the name of Teams. Listing page looks like this

How can I change this highlighted title label?

Is there any hook for this that you know of?

Share Improve this question asked Oct 30, 2018 at 17:26 user9258337user9258337 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

The list_table_primary_column hook might be the one to go with, i.e:

add_filter('list_table_primary_column', 'teams_table_primary_column', 10, 2);

function teams_table_primary_column($colname, $screen_id) {
    if($screen_id == 'teams' && $colname == 'Title') {
        return "New column name";
    }
}

Note: this is completely untested, let me know how it goes!

Reference

本文标签: plugin developmentChange Label of custom post type