Skip to content

Navigation: Add variations for custom post types and taxonomies #24814

@noisysocks

Description

@noisysocks

#24670 added a Post, Page, Tag and Category variation to the Link block. We should extend this so that there is a Link variation for all post types and taxonomies that are registered using register_post_type() and register_taxonomy(). This will allow users to insert links to their third party post types and taxonomies.

This can probably be done by having packages/block-library/src/navigation-link/index.js fetch the post types and taxonomies from the REST API using @wordpress/core-data. It would then dynamically call registerBlockVariation() on core/navigation-link.

See discussion at #24670 (comment).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions