Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation Block: Add support for a dynamic home URL #20542

Open
kjellr opened this issue Feb 28, 2020 · 1 comment
Open

Navigation Block: Add support for a dynamic home URL #20542

kjellr opened this issue Feb 28, 2020 · 1 comment

Comments

@kjellr
Copy link
Contributor

@kjellr kjellr commented Feb 28, 2020

Today, when you add a homepage menu item in the Navigation Block, this gets mapped directly to that page's ID & URL. For example:

<!-- wp:navigation -->
<!-- wp:navigation-link {"label":"Home","id":1837,"url":"https://wordpress.test/?page_id=1837"} /-->
<!-- /wp:navigation -->

This is fine for a single site, but when the navigation block is used in a theme template or template part (or even in a block pattern), we'll want a way to have a homepage link dynamically map directly to the site's homepage, via something like home_url().

@mtias

This comment has been minimized.

Copy link
Contributor

@mtias mtias commented Feb 29, 2020

Absolutely. This is also related to the tasks of removing the url attribute for site resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.