Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Rearranging the WordPress admin menu

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #157832
    Rasmus Jürs
    Participant

    I have often wondered why the “Menu administrator” in WordPress is located under the “Appearance” tab. I dont feel like this is an “Appearance” kind of thing, so from a user experience standpoint it doesn’t make a lot of sense. Secondly, the “Appearance” tab consists of things that the average clients shouldn’t have to deal with, except “Menus”.

    I have a blank’ish theme i use as a starting point for all my sites and i would like to have this theme move the “Menu” administrator to the top level of the admin menu. How would i go about doing this? Another “Nice to have” would be to have the “Menu” administrator visible to Editors by default.

    I’ve never been well versed in actions and filters so any help here would be nice.

    Thank you!

    #157927
    Senff
    Participant

    I actually think it IS an appearance thing. I’m not sure what you mean by the “average client” but I assume you mean content editors.

    Sure, those may you care about posts and pages. But of course there’s more to taking care of a web site than just content. I see a client as someone who takes care of most aspects of a website after I’m done developing it, for example. If they want to change items in the footer, or if they add a page/section and it needs to be added to the menu, or if they want to use a different theme, then these are all things that deal with how the web site looks — hence, that’s why they’re all in the Appearance tab; things that appear on the web site.

    And the client may definitely want to move things around in a menu, so it’s logical enough to me.

    Having said that, if you want to move things around in the menu, there’s plenty of plugins for that. I don’t use that myself so I can’t give you a recommendation, but a quick search should give you a lot of results.

    Another “Nice to have” would be to have the “Menu” administrator visible to Editors by default.

    I guess that’s why there’s various user roles. Some can just do content, others can do content and appearance, etc. But I guess that would take another plugin.

    #157930
    Rasmus Jürs
    Participant

    I know you can probably do it with a plugin but that would mean that i would have to configure this every time i set up a new site. So for conveniensce i woul like it to be part of the basic theme i use for every development.

    We usualy dont give clients access to administering plugins and themes because that would give them full acces to our in house code base and access to plugins is a whole other can of worms.

    This means that the only item under appearance they would have access to is the menu administrator. So in stead of having to go trough the appearance tab, having it at the top level seems more user friendly.

    #157931
    Senff
    Participant

    I know you can probably do it with a plugin but that would mean that i would have to configure this every time i set up a new site. So for conveniensce i woul like it to be part of the basic theme i use for every development.

    Sure you can edit WP core in a way that the Menu option is located somewhere else in the menu, but you can’t do this on theme level, and so you’d have to do it again every time WordPress is updated. That’s why you’re stuck with having to do it in a plugin. Of course, you could write your own plugin that does just that (moving the Menu out of the Appearance and put it somewhere else) and include it with your basic theme.

    We usualy dont give clients access to administering plugins and themes because that would give them full acces to our in house code base and access to plugins is a whole other can of worms.

    Understood. We usually hand over everything after development so that the client has full control. It’s then up to them to figure out who gets to administer plugins/themes and who gets to just enter content.

    #157994
    Rasmus Jürs
    Participant

    I found the solution!

    This little addition to the functions.php file removes the “nav-menu.php” link from appearance and adds it to the top level and moves it up under comments.

    function remove_submenus() {
      global $submenu;
      unset($submenu['themes.php'][10]); // Removes Menu  
    }
    add_action('admin_menu', 'remove_submenus');
    
    function new_nav_menu () {
        global $menu;
        $menu[99] = array('', 'read', 'separator', '', 'menu-top menu-nav');
        add_menu_page(__('Navigation', 'mav-menus'), __('Navigation', 'nav-menus'), 'edit_themes', 'nav-menus.php', '', '', 99);
    }
    add_action('admin_menu', 'new_nav_menu');
    
    function custom_menu_order($menu_ord) {  
    if (!$menu_ord) return true;  
    
    return array(  
        'index.php', // Dashboard  
        'edit.php', // Posts 
        'upload.php', // Media
        'edit.php?post_type=page', // Pages
        'edit-comments.php', // Comments 
        'link-manager.php', // Links 
        'separator1', // First separator  
        'nav-menus.php', // Navigation
        'separator2', // Second separator  
        'themes.php', // Appearance  
        'plugins.php', // Plugins  
        'users.php', // Users  
        'tools.php', // Tools  
        'options-general.php', // Settings  
        'separator-last', // Last separator  
    );
    }  
    add_filter('custom_menu_order', 'custom_menu_order'); // Activate custom_menu_order  
    add_filter('menu_order', 'custom_menu_order');
    

    Source:
    http://wordpress.stackexchange.com/questions/9264/make-sub-menu-items-a-main-link-in-the-admin-menu-using-fuctions-php

    #158015
    Alen
    Participant

    Instead of hacking around wouldn’t setting up proper Roles and Capabilities be better.

    #158034
    Rasmus Jürs
    Participant

    Hi Alen

    That wasn’t realy what i was trying to do. I could just give editors access to menus. But then they would still have to find the menu item under appearances, which would now only contain a single menu item.
    In my mind that would just be bad interface design.

    #158037
    Alen
    Participant

    Are you actually solving a problem you know you have or you think this might be user experience issue?

    #158052
    Rasmus Jürs
    Participant

    I have had clients in the past (unfamiliar with WordPress) ask where to add a new link to the navigation. But it’s not just about that.
    When my clients don’t have access to anything from the “Appearance” section other than Menus. The result of this is that the “Appearance” section is no longer a collection of items (Plugins, Themes etc.) but a superfluous menu item that has no other function than to hide the “Menus” link since it doesn’t have a page of its own.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Back End’ is closed to new topics and replies.