gpt4 book ai didi

wordpress - 将标签文章更改为Wordpress中的文章

转载 作者:行者123 更新时间:2023-12-04 13:20:14 24 4
gpt4 key购买 nike

我正在做wordpress。任何人都可以帮助我如何更改Wordpress中的管理面板菜单标签。

具体来说,我想更改“文章转贴”的标签。以及“文章发布”管理面板中的所有实例。

好心提醒。

最佳答案

这是您需要添加到主题函数文件中的代码。

// 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 '';
}
function change_post_object_label() {
global $wp_post_types;
$labels = &$wp_post_types['post']->labels;
$labels->name = 'Articles';
$labels->singular_name = 'Article';
$labels->add_new = 'Add Article';
$labels->add_new_item = 'Add Article';
$labels->edit_item = 'Edit Article';
$labels->new_item = 'Article';
$labels->view_item = 'View Article';
$labels->search_items = 'Search Articles';
$labels->not_found = 'No Articles found';
$labels->not_found_in_trash = 'No Articles found in Trash';
}
add_action( 'init', 'change_post_object_label' );
add_action( 'admin_menu', 'change_post_menu_label' );

改编自: https://wordpress.stackexchange.com/questions/9211/changing-admin-menu-labels

关于wordpress - 将标签文章更改为Wordpress中的文章,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12949722/

24 4 0