Skip to content

Navigation: Make the block-nav-menus setting more granular #24638

@noisysocks

Description

@noisysocks

As of #24503, themes are able to indicate that they support having non-link blocks in existing menu areas by adding add_theme_support( 'block-nav-menus' ).

However, it may be the case that themes want to use blocks in one menu but not another. We should look at making the block-nav-menus setting more granular.

One approach might be to make it a per menu location setting instead of a per theme setting by updating register_nav_menu to accept a supports argument.

register_nav_menu(
	'primary',
	array(
		'description' => __( 'Desktop Horizontal Menu' ),
		'supports'    => array(
			'blocks' => true,
		),
	)
);

See #24503 (comment).

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