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 badge1 Answer
Reset to default 1The 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 badge1 Answer
Reset to default 1The 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
版权声明:本文标题:plugin development - Change Label of custom post type 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749219828a2334769.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论