You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Issue specifically tracks the ongoing effort to use a slug to reference a Navigation Menu (wp_navigation Post) instead of the current postID based setup.
This is required because IDs are not consistent across environments. Moreover, it opens the way to improve auto-selection of menus based on location with a site template part hierarchy.
Routes
Currently there are two routes open for exploration:
(Preferred) Key by ID, fetch using existing Data APIs and don't modify REST API
This route does not modify the REST API and instead utilises an alternative approach using the existing "collection" endpoint alongside getEntityRecords (plural) to retrieve a Navigation Post by slug.
This Issue specifically tracks the ongoing effort to use a
slug
to reference a Navigation Menu (wp_navigation
Post) instead of the current postID based setup.This is required because IDs are not consistent across environments. Moreover, it opens the way to improve auto-selection of menus based on location with a site template part hierarchy.
Routes
Currently there are two routes open for exploration:
(Preferred) Key by ID, fetch using existing Data APIs and don't modify REST API
PR: #45443.
This route does not modify the REST API and instead utilises an alternative approach using the existing "collection" endpoint alongside
getEntityRecords
(plural) to retrieve a Navigation Post byslug
.This route was explored due to push back on the attempt to modify the REST API to handle slugs.
Pros:
Cons:
Key by slug and modify REST API to accept slug
PR: #42809.
This route updates the REST API to allow for looking up up menus by
slug
as the unique identifier.Pros:
Cons:
The text was updated successfully, but these errors were encountered: