-
Notifications
You must be signed in to change notification settings - Fork 0
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
Automatically update the menu item for the "Top nnn - latest extract" link to match the title #28
Comments
In the current implementation the navigation menu is stored as a reference to post 1326.
In order to find which blocks are in the navigation block you have to use the Site Editor.
I failed to do this. I tried blanking out the label but that left a useless menu item. I've duplicated the link to page ID 332. The original link is
The new link is similar
The override code will detect this className value and use it to replace the |
The method that I wanted to use, which was to extend the logic already developed for #27, doesn't work in the front end since my navigation block is defined using the
When this is used the
which, for the block I want to override, results in
Note: The value for the Each navigation-link is rendered by We therefore have to add a filter function to adjust the output during I already had to use this technique for the |
In #27 I proposed to use But it didn't work for the
It's all a bit bloody messy if you ask me! I wrote to the #core-editor channel in Making WordPress Slack Hi, I'm looking at the |
I got a reply from @dlh01 saying look at WordPress/wordpress-develop#7522 This PR and ticket primarily refers to the I don't think there are any new tests that implement filter functions for I should probably also test whether or not the problem I discovered is due to the fact that the |
The navigation menu item for "Top nnn - latest extract" links to the page https://top-10-wp-plugins.com/top-12-latest-extract/
In the oobit child theme of Twenty Eleven the menu automatically updates to match the title of the page.
It's currently "Top 147 - latest extract" since that's how many plugins have been downloaded more than 10 million times.
As more plugins reach 10M, I update title of the page to match the new number. The slug remains the same.
WIth the oobit-2025 theme the menu item doesn't update automatically.
This is a minor but annoying problem.
Requirement
Proposed solution
render_block_data
for navigation menu items.The text was updated successfully, but these errors were encountered: