Pages before Posts and change of admin menu

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: Issues · ClassicPress/ClassicPress · GitHub

Author: Pieter Bos

Vote count: 52

Status: open

Tags:

  • request-modify-feature
  • difficulty-moderate

Comments

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.

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

As stated above, this is for plugins to implement and we already have a good plugin solving this issue.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.