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

"don't miss" menu label is not displayed #1083

Closed
aschweigert opened this issue Jan 21, 2016 · 2 comments
Closed

"don't miss" menu label is not displayed #1083

aschweigert opened this issue Jan 21, 2016 · 2 comments
Assignees
Labels
priority: high Either blocks work on a priority-normal task or a solution here informs other work. type: bug

Comments

@aschweigert
Copy link

Even with the menu activated, populated and a label provided in the theme options, the label does not display (not visually hidden, the markup isn't even being output)

@aschweigert aschweigert added type: bug priority: high Either blocks work on a priority-normal task or a solution here informs other work. labels Jan 21, 2016
@aschweigert aschweigert added this to the 0.5.5 - Story Elements milestone Jan 21, 2016
@benlk
Copy link
Collaborator

benlk commented Jan 21, 2016

The label name set in inc/nav-menus.php in largo_add_dont_miss_label is hooked on the wp_nav_menu_dont-miss_items hook, which works if and only if the menu assigned to that area has a name that slugifies to "dont-miss".

If the user assigns a different menu, like "Recommended", then it doesn't output because the hook is different.

@benlk
Copy link
Collaborator

benlk commented Jan 21, 2016

To get the correct nav slug to use in the add_action, look at the wp_get_nav_menu_object call here: https://core.trac.wordpress.org/browser/tags/4.4.1/src/wp-includes/nav-menu-template.php#L301

The location is dont-miss, but the menu may be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Either blocks work on a priority-normal task or a solution here informs other work. type: bug
Projects
None yet
Development

No branches or pull requests

3 participants