Skip to content

Custom Menu Order

Frank Bültge edited this page Nov 23, 2017 · 2 revisions

Adminimize works also if you use a custom menu order. However beware that you use the right hooks for a custom menu order of WordPress items inside the menu. The follow example demonstrate it. Also you read about it on the official codex page.

add_filter( 'custom_menu_order', '__return_true' );
add_filter( 'menu_order', 'fb_reorder_admin_menu' );

function fb_reorder_admin_menu( $menu_order ) {

	return array(
		'options-general.php', // Settings
		'edit.php', // Posts
		'index.php', // Dashboard
		'separator2', // --Space--
		'woocommerce', // WooCommerce
		'edit.php?post_type=product', // Products
		'separator1', // --Space--
		'edit.php?post_type=tribe_events', // Events
		'edit.php?post_type=wc_booking', // Bookings
		'upload.php', // Media
		'edit.php?post_type=page', // Pages
	);
}

Small hint, if you use a custom menu order, the settings page of Adminimize need an update of the settings so that the menu settings area have also the same order of your custom menu.

Clone this wiki locally