Put the wp-admin menu items in the order your team uses most, such as Pages above Posts.
add_filter( 'custom_menu_order', '__return_true' );
add_filter( 'menu_order', function (): array {
return [
'index.php', // Dashboard.
'separator1',
'edit.php?post_type=page', // Pages.
'edit.php', // Posts.
'upload.php', // Media.
'woocommerce', // WooCommerce.
'edit.php?post_type=product', // Products.
'separator2',
'themes.php', // Appearance.
'plugins.php', // Plugins.
'users.php', // Users.
'tools.php', // Tools.
'options-general.php', // Settings.
'separator-last',
];
} );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
On brochure sites, Pages matter more than Posts. On stores, WooCommerce and Products are what people open every day. This snippet puts the admin menu in the order you choose.
Returning true from custom_menu_order tells WordPress to apply menu_order. That filter returns the menu items, by their file names or slugs, in the order you want them. Items you don’t list keep their position after the listed ones, so plugin menus never disappear.
separator1, separator2 and separator-last.page= value, or the file name for top-level items.Reload wp-admin. Pages should appear above Posts.