From looking at the codex and after using
print_r($GLOBALS['menu']; to display the array list of menu items, I see my CPTs listed as
in the returned array.
20 is the
Pages menu item, and
15 as the
Links menu item. I have a settings plugin which I wish to display with my Custom Posts. If I add
add_menu_page( 'Settings', 'Settings', 'manage_options', 'plugin_name', 'plugin_name_options_page', content_url( '/img/icon.png', __FILE__), 20 );
Pages menu item is overwritten completely by my plugin entry, rather than being moved to
The array for the Posts section in the menu seems to end at 25, so I was thinking I have two options;
- Figure out how to insert my plugin into the menu array as
20and move the other pages in the array further along by
- Manually set the menu number for my plugin and my CPTs. I have the plugin menu code - how and where do I add similar functionality in my custom posts code?