重命名自定义帖子类型列表页面默认操作按钮WordPress
如何在WordPress中重命名特定的自定义帖子类型列表页面操作按钮重命名自定义帖子类型列表页面默认操作按钮WordPress,wordpress,Wordpress,如何在WordPress中重命名特定的自定义帖子类型列表页面操作按钮 是否有任何钩子可以重命名特定自定义帖子类型的操作按钮?请给出您尝试过的内容? 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; g
是否有任何钩子可以重命名特定自定义帖子类型的操作按钮?请给出您尝试过的内容?
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' );