Got it, thanks to cjbj‘s help, I was able to get the final solution:
add_filter( 'custom_menu_order', 'submenu_order' );
function submenu_order( $menu_order ) {
# Get submenu key location based on slug
global $submenu;
$settings = $submenu['options-general.php'];
foreach ( $settings as $key => $details ) {
if ( $details[2] == 'blogging' ) {
$index = $key;
}
}
# Set the 'Blogging' menu below 'General'
$submenu['options-general.php'][11] = $submenu['options-general.php'][$index];
unset( $submenu['options-general.php'][$index] );
# Reorder the menu based on the keys in ascending order
ksort( $submenu['options-general.php'] );
# Return the new submenu order
return $menu_order;
}
Related Posts:
- Adding a menu item in the admin bar
- Remove All in One Pack from the admin bar
- Hide admin menu on update_option
- Custom admin menu order fails if slugs are complicated
- How do I Enqueue styles/scripts on Certain /wp-admin Pages?
- Changing Admin Menu Labels
- Is there ANY way to remove comments function and section totally?
- How to use “menu_order” field for posts?
- Add “external” link to admin menu in the backend
- How to add custom submenu links in wp-admin menus?
- Edit specific nodes in WP_Admin_Bar
- How to add notification bubble for my custom admin menu page
- How to create sub menu with a URL parameter?
- wp-admin pages return ERR_EMPTY_RESPONSE
- How to remove items from +New admin menu?
- Make sub menu items a main link in the admin menu using fuctions.php
- Add column to pages table
- Admin account only shows Profile and Dashboard with no activity
- How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?
- How to disable admin flyout menus?
- WordPress custom permalinks not working on OS X localhost
- remove plugin admin menu in wordpress without installing plugin in v3.8.1
- How to prevent parent admin page from appearring as a child admin page
- Why I can’t change the permalink of this page?
- What is an “Options Framework” for WordPress
- Rename W3 Total Cache admin menu
- WordPress address URL keeps dropping the www
- Remove query var on admin pages when ‘Save changes’ pressed
- Change top level menu item to point to custom submenu item
- Logout hyperlink within a sub-menu
- Create a admin page in wordpress without admin menus (“wordpress sidebars”)
- using wp_sprintf at wordpress option page,
- Admin Panel – Custom Menu Sub-Item LINK
- WordPress Options Page not working
- Cannot find an OLD Gravity Form on an OLD Word Press site [closed]
- wrapping ‘rest_api_init’ in ‘is_admin()’ function
- Add column to pages table
- How to change user admin_color with WP CLI?
- Possibilities for the edit.php admin panel? [closed]
- Add menu option to “New Post” menu in admin bar
- Admin menu in front-end
- Remove or move admin submenus under a new menu
- How to get specific page screen ID
- Removing Dashboard Menu Items Through The Database
- WordPress Side Menu Admin Panel Default Order numbers List?
- load-{$page hook} and returned parameter
- meta box on new admin page
- Custom plugin admin page issues
- Change admin defaults for reading settings
- How to hide Admin Tabs? [duplicate]
- unsuccessful attempt to change domains- wordpress re-routing to old domain
- Making Comments, a sub_menu in admin menu
- Admin top level menu, pointing to an external url
- How to break line / add to ADMIN menu
- Creating custom admin panel pages without making a plugin?
- Change users.php WP_User_Query
- How can I control which plugins run in the dashboard?
- how to stop wordpress admin menu from scrolling with page
- How do you add a settings page to another menu?
- Trying to create a page as a menu item in the admin while keeping the admen panel visible
- Sub menu is not working properly
- WordPress Admin Panel Left Sidebar No showing on Post create page
- Weird white space in admin area
- How to change the URL of sub menu page?
- Form input values are empty after submit
- Redirect from wp-admin back to page
- How to move “Collapse Menu” to top of admin bar?
- Admin page changes the $_POST data
- Some fields in Settings API form are saving, others are not
- Appearance -> Menus doesn’t show
- restrict admin panel sections to users
- How to Fix WordPress Not Saving Settings?
- Remove menu item dashboard for a unique user
- How to display status messages in admin panel
- adding existing menu page on new customer user role
- Disable flyout (popup) menus in backend
- Remove Theme menu link from Admin Panel
- Options site set empty fields after submitting
- Remove capability to interact with a page
- How to keep the plugin submenu open on viewing a custom version of users.php?
- I am not able to enable jQuery in theme settings
- Cannot Update wp DB – Get 500 Error
- Creating your own options-general.php page
- Redirection to external site on admin
- Move Custom Taxonomy Menu to Top Level Admin Menu
- get_current_screen() does not return parent_file
- Add an admin page, but don’t show it on the admin menu
- From 403 error to 500 internal server error
- wp_comments table really big casuing /wp-admin/edit-comments.php to slowly load
- Detect Featured Image remove while editing post in wp-admin (client-side)
- can’t access backend while frontend works perfect
- How to change home page only in WordPress
- Admin Page access
- Add HTML to custom post type edit page
- WP site after login keeps redirecting to looped url [closed]
- Edit “Not Available” Page
- admin-ajax and external service interaction
- Add admin page to the top of the admin panel
- Submitting form to admin-post.php WordPress
- /wp-admin/ – this link showing me “Index of /wp-admin”/ instead of dashboard