Created
November 22, 2024 20:05
-
-
Save RadGH/7f0c3179e9c27628a2ebb7ffb839471d to your computer and use it in GitHub Desktop.
Re-order WordPress dashboard admin menu by top-level page slugs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Reorder admin menu | |
add_filter( 'custom_menu_order', '__return_true' ); | |
add_filter( 'menu_order', 'my_theme_reorder_admin_menu' ); | |
function my_theme_reorder_admin_menu() { | |
return array( | |
'index.php', | |
'edit.php?post_type=page', | |
'edit.php', | |
'edit.php?post_type=testimonials', | |
'edit.php?post_type=portfolio', | |
'separator1', | |
'themes.php', | |
'admin.php?page=gf_edit_forms', | |
'users.php', | |
'upload.php', | |
'plugins.php', | |
'tools.php', | |
'options-general.php', | |
'separator2', | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment