Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I know this may be a bit crazy, and hopefully there's a way of doing this with out chopping up the core.

I am trying to clean up my Wordpress admin menu's and in doing such I'd like to move Comments under Posts. The problem is obouvisly edit-comments.php is a main menu item and not a sub-menu item.

I know you can make a sub_menu item a main menu item so i hoping to

Visually Speaking it'll look like this.

  • Posts
    • All Posts
    • Add New
    • Categories
    • Tags
    • Comments.

I tried this with out luck, which makes sense it doesn't work but it was an attempt...

function change_post_menu_label() {
global $menu;
global $submenu;
$menu[5][0] = 'Blog';
$submenu['edit.php'][5][0] = 'Manage Posts';
$submenu['edit.php'][10][0] = 'Add New Post';
$submenu['edit.php'][15][0] = 'Categories'; // Change name for categories
$submenu['edit.php'][16][0] = 'Tags'; // Change name for tags
$submenu['edit-comments.php'][25][0] = 'Comments';
$submenu['edit-comments.php'][0][0] = 'Comments';
echo '';
}
share|improve this question

1 Answer

up vote 0 down vote accepted

Well one way to do it would be to add a new sub menu page and just remove the old one.

function wpse_80457_menu() {
add_submenu_page( 'edit.php', 'Comments', 'Comments', 'manage_options', 'edit-comments.php'); 
remove_menu_page( 'edit-comments.php' );
}

add_action('_admin_menu', 'wpse_80457_menu');
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.