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
I’m a huge fan of your _tk starter theme; thank you so much for making it available!
I recently found two issues with the theme’s bootstrap-wp-navwalker.php file.
When I edit WordPress menus from the admin area, I found that the “title” attribute value of links in the menu was always output as the “navigation label” value, rather than the “title attribute” value.
I also found that the glyphicon that wraps the tag anchor text was created with a separate class value for each word in the “title attribute” value, rather than a a single class with hyphen-separated “title attribute” value.
I made two changes to the bootstrap-wp-navwalker.php file which fixed this.
At around line 79, I removed this:
$atts['title'] = ! empty( $item->title ) ? strip_tags($item->title) : '';
Without these changes, I find that every menu item gets a title tag, and the title tag is always equal to the anchor text. This is pointless (right?) and the resulting tooltips often obscure the menu or make navigation more confusing. With these changes, the "title" field in the menu editor GUI is actual usable, and the editor has the option to leave it blank if they do not want a link title tooltip.
From: Paul Solomon Subject: _tk theme bug report
Message Body:
Hi Guys,
I’m a huge fan of your _tk starter theme; thank you so much for making it available!
I recently found two issues with the theme’s bootstrap-wp-navwalker.php file.
When I edit WordPress menus from the admin area, I found that the “title” attribute value of links in the menu was always output as the “navigation label” value, rather than the “title attribute” value.
I also found that the glyphicon that wraps the tag anchor text was created with a separate class value for each word in the “title attribute” value, rather than a a single class with hyphen-separated “title attribute” value.
I made two changes to the bootstrap-wp-navwalker.php file which fixed this.
At around line 79, I removed this:
$atts['title'] = ! empty( $item->title ) ? strip_tags($item->title) : '';
and substituted this:
$atts['title'] = ! empty( $item->attr_title ) ? strip_tags($item->attr_title) : '';
That results in the correct title attribute being generated.
At around line 113, I removed this:
$item_output .= ' ';
And replaced it with this:
$item_output .= ' ';
That results in the proper class value being generated.
Hope that’s helpful!
The text was updated successfully, but these errors were encountered: