重命名自定义帖子类型列表页面默认操作按钮WordPress

时间:2016-12-14 07:11:36

标签: wordpress

如何在WordPress中重命名特定的自定义帖子类型列表页面操作按钮?

是否有任何钩子可以重命名特定自定义帖子类型的操作按钮?

1 个答案:

答案 0 :(得分:-1)

Here is the code you need to add into your theme functions file.
// Replace Posts label as Articles in Admin Panel 

function change_post_menu_label() {
    global $menu;
    global $submenu;
    $menu[5][0] = 'Articles';
    $submenu['edit.php'][5][0] = 'Articles';
    $submenu['edit.php'][10][0] = 'Add Articles';
    echo '';
}
add_action( 'admin_menu', 'change_post_menu_label' );