Using menu_position to add two entries between Dashboard and Posts
We're looking to add two new (custom post type) entries between Dashboard and Posts.
In this project, for the end user, two items are going to be by far the most used items in his dashboard. So we want them at the top.
These seem to be the built in menu_position
settings:
This only gives a single slot, menu_position=3, between Dashboard and Posts. And we need two slots!
What we've tried:
1) Using decimals - as strings - is sometimes suggested (ie. 3.1 and 3.2). But this definitely doesn't work in current WordPress. Our menu entries drop down to the default position.
2) Setting both of them to 3. This isn't allowed. It results in one of them dropping down to the default position.
Other suggestions on this site involve a custom function which grabs all the menu items one by one and reorders them individually but this looks fragile. What if other items are added at a later date? Can't we just reorder Dashboard up (or Posts down) to make space?
Topic menu-order admin-menu custom-post-types Wordpress
Category Web