Support › MB Settings Page › Settings Pages Sort order
Is there a way we can sort settings pages and their sub pages?
I have a few nested settings pages and would love to either have them sorted alphabetically or by a custom sort order.
Screenshot of my settings pages
You can use the option position when registering the settings page (with code) to sort the settings page and sub-pages. Please read more on the documentation https://docs.metabox.io/extensions/mb-settings-page/#using-code
Thanks. Another couple of questions.
I can get that working for manually created settings and subpages. It's a bit long-winded as when I add a new page I need to change all of the positions.
1 - Is there a way to do this automatically, i.e auto sort alphabetically?
Also when I add a CPT to show in my settings page, I cannot position this.
2 - Is there a way to do this?
3 - Is there a way to show a CPT on my settings page.
1. I don't know a way to sort the sub-settings page automatically like that. You can try to create a topic on WordPress.org support forum to ask for help of other developers.
2. WordPress also does not support adding the position for CPT that displays under a menu page. Please read more on the documentation https://developer.wordpress.org/reference/functions/register_post_type/#menu_position
3. If you want to display the CPT menu as a submenu under a Settings page topmenu, please use the setting show_in_menu. The builder of Meta Box also supports this option.