Skip to content

Submenu Pages

Set parent to register the page as a submenu item instead of a top-level menu.

Wireframe\App::boot([
'prefix' => 'my-plugin',
'page_title' => __('My Plugin', 'my-plugin'),
'parent' => 'tools', // → Tools › My Plugin
'config' => __DIR__ . '/config/settings.php',
]);

For the WordPress core menus, pass a short alias. The framework maps it to the canonical parent slug for you:

AliasMaps toWhere it lives
dashboardindex.phpDashboard
postsedit.phpPosts
mediaupload.phpMedia
pagesedit.php?post_type=pagePages
commentsedit-comments.phpComments
appearancethemes.phpAppearance
pluginsplugins.phpPlugins
usersusers.phpUsers
toolstools.phpTools
settings/optionsoptions-general.phpSettings

For anything not in the alias map — including custom post types and other plugins’ menus — pass the parent slug directly:

'parent' => 'options-general.php', // Settings (long form)
'parent' => 'edit.php?post_type=product', // WooCommerce › Products
'parent' => 'woocommerce', // WooCommerce top-level

In multi-page boots, each page can set its own parent, or inherit the boot-level value:

Wireframe\App::boot([
'prefix' => 'my-plugin',
'parent' => 'tools', // Default for every page below
'pages' => [
['page_title' => 'General', 'config' => /* … */],
['page_title' => 'Reports', 'config' => /* … */, 'parent' => 'edit.php'], // Overrides
],
]);