Skip to content

Commit 2d6a8b6

Browse files
committed
Add a note to the readme about icon only menu items
1 parent 9e68ecd commit 2d6a8b6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- Added support for link modifiers and icons through WP Menu Builder 'classes' input.
2121
- Icon support is for Font Awesome 4/5 and Glyphicons icons.
2222
- Added unit tests for the `fallback` method.
23+
- Added code to handle icon-only menus.
2324

2425
## [3.0.0]
2526

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ This script included the ability to use Bootstrap nav link mods in your menus th
123123

124124
To add an Icon to your link simply enter Glypicons or Font Awesome class names in the links **CSS Classes** field in the Menu UI and the walker class will do the rest. IE `glyphicons glyphicons-bullhorn` or `fa fa-arrow-left` or `fas fa-arrow-left`.
125125

126+
#### Icon-Only Items
127+
128+
To make an item appear with the icon only apply the bootstrap screen reader class `sr-only` to the item alongside any icon classnames. This will then hide only the text that would appear as the link text.
129+
126130
#### Disabled Links
127131

128132
To set a disabled link simply add `disabled` to the **CSS Classes** field in the Menu UI and the walker class will do the rest. _Note: In addition to adding the .disabled class this will change the link `href` to `#` as well so that it is not a followable link._

0 commit comments

Comments
 (0)