Submenu link not appearing (for Export page)

Hi all, I’ve simplified Bracken’s Thin CC export plugin and am trying to move its options page from the ‘tools’ menu to the ‘export’ menu in the dashboard. See The problem I’m having is that the submenu link is not appearing under the export menu. I think the problem is how I’m referring to the parent slug (I’m using pb-export) but I’m stuck. Any help greatly appreciated.

The current export menu item for Pressbooks appears to be loading as a child of admin.php. Don’t know if that makes any difference?

	$plugin_page = add_submenu_page(
		'Export Common Cartridge',
		'Export Common Cartridge',
		basename( __FILE__ ),

Slug has underscore, not hyphen.
‘export’, there is no such capability, see // see


1 Like

Thanks, Dac! I think Bracken may have defined the ‘export’ capability elsewhere (I left this arg unchanged), but I will replace with ‘edit_posts’. It looks to be working as expected now. Sorry to ask you to catch my typos for me!

Oh, and I am seeing an ‘export’ capability on the reference doc you sent me: Do you have an opinion about which would be more suitable in this use case?

I’d look at the menu for Pressbooks’ export page. I believe we use the manage_options capability.

1 Like

Looks like you’re using ‘edit_posts’ there currently, unless I’m looking in the wrong place:

Yes, that’s correct— thanks for checking!

1 Like

I am seeing an ‘export’ capability on the reference doc you sent me.

I learn something new everyday. :slight_smile:

1 Like