Skip to content

Can't attach submenu to a top level menu #77

Open
@shaonsina

Description

@shaonsina

I've created a top level menu for my specific need.
After that I would like to create a submenu and attach it to the top level menu by Carbon Fields and creating the options for the page.
But it noting working.

see the below code:

	function add_menu() {
		add_menu_page(
			esc_html__('Configuration', 'test'),
			esc_html__('TEST', 'test'),
			'manage_options',
			'test-configure',
			'configure_page',
			'dashicons-admin-generic',
			'50'
		);
	}
	add_action( 'admin_menu', 'add_menu' );

	Container::make( 'theme_options', esc_html__( 'Settings', 'test' ) )
		->set_page_menu_title( 'Settings' )
		->set_page_parent( 'test-configure' )
		->set_page_file( 'admin.php?page=test-settings' )
		->add_fields( [
			Field::make ...
		] );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions