Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
90 views
in Technique[技术] by (71.8m points)

Editing the WordPress Admin Menus

This is a 2 part question.

  1. I followed this guide to be able to change an admin menu item, but what is the process to find out what the WordPress menu key is? I am using this theme but the developer has stopped support and would like to change careers menu and submenu labels.

  2. Once the above is done, how to change the hard coded slug & breadcrumbs to match the new menu item?

The goal is to edit the naming structure associated with this but keep its functionality. I found in the theme > Admin > theme_functions.php the code it uses for this part but not sure how to override this in the child theme?

Any help would be great.

if( 'career' == $post_type ){
        $slug = get_option('tommusrhodus_careers_slug', 'careers');
        $home .= '<li class="active"><a href="' . esc_url( home_url( "/". $slug ."/" ) ) . '">' . esc_html__( 'Careers', 'stack' ) . '</a></li>';
    }
question from:https://stackoverflow.com/questions/65916889/editing-the-wordpress-admin-menus

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You could simply use this plugin that has a UI to change everything: https://wordpress.org/plugins/admin-menu-editor/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...