Since ClassicPress has set itself in the market as the business-focused CMS, I think that the Admin Sidebar menu can receive a much needed overhaul.
For starters Pages should be placed higher up in the Dashboard than Posts.
Ideally the order would become:
Dashboard
Pages
CPTs
Posts (with Comments being a submenu - see here )
Media
Appearance
Plugins
Users
Tools
Settings
and ideally all Settings of Plugins come below here, so the Dashboard can no longer be hijacked anymore).
Read-only archive : https://petitions.classicpress.net/posts/75/pages-before-posts-and-change-of-admin-menu
Author : Pieter Bos
Vote count : 52
Status : open
Tags :
request-modify-feature
difficulty-moderate
Comments
at best, there might be a real reduction of all that clutter, although I dont know yet how to achieve this. Each CPT is usually adding another entry in the menu, and at some point, one has to scroll a lot …
~ posted by Fabian Wolf
I like Pieter’s organization. I’d like CP to consider replacing the side menu with a horizontal menu fixed to the top, similar to W2O Admin Dropdown Menu (W2O Admin Dropdown Menu – WordPress plugin | WordPress.org ). It can get pretty cluttered too (any menu with more than 10-12 items will be), but at least it’s always in view and leaves more of the screen width for what you’re working on.
~ posted by Ray Gulick
I like this idea. I like the suggestion of CPTs in the menu, hoping that the follow through would be all CPTs are sub menu items to that. A lot of themes add CPTs all over the place in WordPress. It would be nice to have them contained if possible. Don’t know if it is though.
~ posted by a ClassicPress Supporter
Not sure if all CPTs should be gathered as items under 1 menu. We usually build a bespoke theme for our clients and most of them come with at least one, sometimes more CPTs. These all have a function on the site and a place in the backend and I would not want to have to explain to clients that they can find the logic in a submenu
Regarding moving the Setting menus of plugins to the bottom, I have implemented that already in a plugin I developed a while ago. This works excellent for a plugin like Jetpack and Gravity Forms has its own function to move its position. See lean-wp/class-lean-wp.php at master · senlin/lean-wp · GitHub and lean-wp/class-lean-wp.php at master · senlin/lean-wp · GitHub
~ posted by Pieter Bos
I’m not for any of this. Any plugin can inject itself wherever it wants to be placed; this is a blessing and a curse, but it works. If a CPT needs a top-level menu, the author should take 37 seconds and write a function that generates the entry.
~ posted by Code Potent
I would also like to see the option to hide items (from yourself, or from other users) be baked in. Something simple, checkboxes, etc., for pieces you don’t use. Mainly helpful when things get cluttered…
~ posted by Glenn Dixon
I’m also not a fan of plugins Hijacking Main Menus, but I also don’t believe there is a real solution to the problem. I think the only way to improve the current situation would be to offer the option to easily reorganize the Menu Items. Plugins like Admin Menu Editor – WordPress plugin | WordPress.org Try to do that but, you quickly run into Plugins/Menu Items that fail to get reassigned, so to be honest I’m not sure if it can be done at all.
~ posted by Daniel Klose
@pieter , but in this specific example there seems to be a call especially for gravity forms. Does this mean gravity forms for example would not adhere to a general custom_menu_order filter call? If so, with 50k plugins out there I doubt this is a feasible approach to the problem as there are surely more than a handful that do similar things?
~ posted by Daniel Klose
@pieter - I expect many of the petitions for ClassicPress are about establishing a default different than WordPress and/or a standard that does not exist in WordPress. Given that, I expect many of the things petitioned here are easy to do with hooks, but doing them with hooks does not make them default nor a standard approach. #jmtcw #fwiw
~ posted by Mike Schinkel
@Daniel - yes that is true , GF is an exception which potentially could be one of many. The first rule though moves what I believe is the majority to the bottom, including plugins like Jetpack, which usually places itself at the very top right under “Dashboard”.
@Mike - I am not aware that I have made such claim
~ posted by Pieter Bos
I think that by the time v1 is out of the door and we start by seriously looking at petitions that have the required number of votes, we will also need to start combining things. There are numerous comments related petitions and as Ray points out, there are also a few already related to various things to do with the admin UI.
~ posted by Pieter Bos
Is this something that could be addressed as a plugin first? I would strongly recommend starting that way if possible, that way we can iterate there and recommend the plugin for testing.
If you’d like to put something up on GitHub under the ClassicPress name, let me know and I’ll create a repository for it. ClassicPress/organize-admin-menus
is one idea for the name.
~ posted by James Nylen
timkaye
October 18, 2021, 3:18pm
#3
As this and related discussions have shown, different people use CP (and WP) for different purposes and therefore prefer to see the admin menu organized in different ways. So I don’t see the point of having a new default, while specific tweaks are plugin territory. The only question in my mind is whether more hooks should be added to make re-organization of the menu easier for those who want to do that.
timkaye
October 18, 2021, 4:33pm
#4
Here’s some code to move items where you want, based on this: How can I control the position in the admin menu of items added by plugins? - WordPress Development Stack Exchange
/* REORGANIZE ADMIN MENU */
# Activates the 'menu_order' filter
add_filter( 'custom_menu_order', '__return_true' );
# Helper function to move an element inside an array
function move_element( &$array, $from_index, $to_index ) {
$out = array_splice( $array, $from_index, 1 );
array_splice( $array, $to_index, 0, $out );
}
# Filters the default menu order
function kts_admin_menu_order( $menu_order ) {
# Define your new desired menu positions here
$new_positions = array(
'upload.php' => 11 // Media
);
# Move new positions if found in the original menu_positions
if ( ! empty( $new_positions ) ) {
foreach( $new_positions as $value => $new_index ) {
$current_index = array_search( $value, $menu_order );
if ( ! empty( $current_index ) ) {
move_element( $menu_order, $current_index, $new_index );
}
}
}
return $menu_order;
}
add_filter( 'menu_order', 'kts_admin_menu_order' );
2 Likes
There is also the Update Admin Menu plugin which allows menu items to be reordered.
It’s on my dev list to allow entries to be removed.
2 Likes
viktor
June 24, 2022, 8:03pm
#7
As stated above, this is for plugins to implement and we already have a good plugin solving this issue.
1 Like
viktor
closed
June 27, 2022, 8:04pm
#8
This topic was automatically closed after 2 days. New replies are no longer allowed.