-
nullideParticipant
Hi there and first of all thanks to Daniel for this awesome theme.
I have a question: is it possible to choose different glyphicons to be displayed next to a manu item? I’d like to pick some that are not included in the drop-down list in the menu editor.
Does anyone know how to do it?
Thanks
FromH3llParticipantI was wondering the same thing as nullide!
It would be great if there is a way to use all the available icons. It would be even more great if there is any tutorial about how to extent the glyphicons list with more icons packs. (in case you don’t want to fill your theme by default with large amount of icons)
I browsed a lot of themes before choosing yours and I notice most of them have tons of icons, so I was wondering if you could help us resolve this matter as the option for changing theme with such features or even installing a plugin for more icons would be just lame. Your theme is very clean and organized and there is no way I’m gonna give up! π
So please help us or provide us some hints/ tutorials on how to implement them by ourselvs!
Keep it up!
benlyeParticipantI imagine doing this is inadvisable, as your changes will get overwritten next time you update your theme, but adding extra Glyphicons is possible.
You need to edit /wp-content/themes/enlightenment/core/functions/menu-icons.php and add new lines in the $icons array for each extra Glyphicon you want.
For example, to add the ‘Save’ icon I added this line at the end of the array, after the ‘time’ line:
'save' => __( 'Save', 'enlightenment' ),
The full list of Glyphicons is here.
Ben
- This reply was modified 9 years, 9 months ago by benlye.
paulunstechParticipantI will surely try this, as I definitely would love to have more icons available for menu items. There should be all types of icons (like Font Awesome icons) and not just Glyphicons…
Thanks for the post Ben.
Any advisable update as far as other icons would be enormously appreciated.
Best,
PaulDaniel TaraKeymasterYou have a filter called enlightenment_menu_icons that you can use to add more icons. Here’s an example:
add_filter( 'enlightenment_menu_icons', 'enlightenment_extra_menu_icons' ); function enlightenment_extra_menu_icons( $icons ) { return array_merge( $icons, array( 'asterisk' => __( 'Asterisk', 'enlightenment' ), 'glass' => __( 'Glass', 'enlightenment' ), 'signal' => __( 'Signal', 'enlightenment' ), ) ); }
The array key needs to be the glyphicon font class without the glyphicon- prefix, as they are defined at the Bootstrap Documentation. The array values are the text that will appear in the admin drop-down menu.
mampfParticipantAll icons. Some are invisible in the Menueditor, but they are visible on the page. Seems like a bug π
<?php add_filter( 'enlightenment_menu_icons', 'enlightenment_extra_menu_icons' ); function enlightenment_extra_menu_icons( $icons ) { return array_merge( $icons, array( 'adjust' => __( 'adjust', 'enlightenment' ), 'alert' => __( 'alert', 'enlightenment' ), 'align-center' => __( 'align-center', 'enlightenment' ), 'align-justify' => __( 'align-justify', 'enlightenment' ), 'align-left' => __( 'align-left', 'enlightenment' ), 'align-right' => __( 'align-right', 'enlightenment' ), 'apple' => __( 'apple', 'enlightenment' ), 'arrow-down' => __( 'arrow-down', 'enlightenment' ), 'arrow-left' => __( 'arrow-left', 'enlightenment' ), 'arrow-right' => __( 'arrow-right', 'enlightenment' ), 'arrow-up' => __( 'arrow-up', 'enlightenment' ), 'asterisk' => __( 'asterisk', 'enlightenment' ), 'baby-formula' => __( 'baby-formula', 'enlightenment' ), 'backward' => __( 'backward', 'enlightenment' ), 'ban-circle' => __( 'ban-circle', 'enlightenment' ), 'barcode' => __( 'barcode', 'enlightenment' ), 'glyphicon-bed' => __( 'glyphicon-bed', 'enlightenment' ), 'bell' => __( 'bell', 'enlightenment' ), 'bishop' => __( 'bishop', 'enlightenment' ), 'bitcoin' => __( 'bitcoin', 'enlightenment' ), 'blackboard' => __( 'blackboard', 'enlightenment' ), 'bold' => __( 'bold', 'enlightenment' ), 'book' => __( 'book', 'enlightenment' ), 'bookmark' => __( 'bookmark', 'enlightenment' ), 'briefcase' => __( 'briefcase', 'enlightenment' ), 'btc' => __( 'btc', 'enlightenment' ), 'bullhorn' => __( 'bullhorn', 'enlightenment' ), 'calendar' => __( 'calendar', 'enlightenment' ), 'camera' => __( 'camera', 'enlightenment' ), 'cd' => __( 'cd', 'enlightenment' ), 'certificate' => __( 'certificate', 'enlightenment' ), 'check' => __( 'check', 'enlightenment' ), 'chevron-down' => __( 'chevron-down', 'enlightenment' ), 'chevron-left' => __( 'chevron-left', 'enlightenment' ), 'chevron-right' => __( 'chevron-right', 'enlightenment' ), 'chevron-up' => __( 'chevron-up', 'enlightenment' ), 'circle-arrow-down' => __( 'circle-arrow-down', 'enlightenment' ), 'circle-arrow-left' => __( 'circle-arrow-left', 'enlightenment' ), 'circle-arrow-right' => __( 'circle-arrow-right', 'enlightenment' ), 'circle-arrow-up' => __( 'circle-arrow-up', 'enlightenment' ), 'cloud' => __( 'cloud', 'enlightenment' ), 'cloud-download' => __( 'cloud-download', 'enlightenment' ), 'cloud-upload' => __( 'cloud-upload', 'enlightenment' ), 'cog' => __( 'cog', 'enlightenment' ), 'collapse-down' => __( 'collapse-down', 'enlightenment' ), 'collapse-up' => __( 'collapse-up', 'enlightenment' ), 'comment' => __( 'comment', 'enlightenment' ), 'compressed' => __( 'compressed', 'enlightenment' ), 'console' => __( 'console', 'enlightenment' ), 'copy' => __( 'copy', 'enlightenment' ), 'copyright-mark' => __( 'copyright-mark', 'enlightenment' ), 'credit-card' => __( 'credit-card', 'enlightenment' ), 'cutlery' => __( 'cutlery', 'enlightenment' ), 'dashboard' => __( 'dashboard', 'enlightenment' ), 'download' => __( 'download', 'enlightenment' ), 'download-alt' => __( 'download-alt', 'enlightenment' ), 'duplicate' => __( 'duplicate', 'enlightenment' ), 'earphone' => __( 'earphone', 'enlightenment' ), 'edit' => __( 'edit', 'enlightenment' ), 'education' => __( 'education', 'enlightenment' ), 'eject' => __( 'eject', 'enlightenment' ), 'envelope' => __( 'envelope', 'enlightenment' ), 'equalizer' => __( 'equalizer', 'enlightenment' ), 'erase' => __( 'erase', 'enlightenment' ), 'eur' => __( 'eur', 'enlightenment' ), 'euro' => __( 'euro', 'enlightenment' ), 'exclamation-sign' => __( 'exclamation-sign', 'enlightenment' ), 'expand' => __( 'expand', 'enlightenment' ), 'export' => __( 'export', 'enlightenment' ), 'eye-close' => __( 'eye-close', 'enlightenment' ), 'eye-open' => __( 'eye-open', 'enlightenment' ), 'facetime-video' => __( 'facetime-video', 'enlightenment' ), 'fast-backward' => __( 'fast-backward', 'enlightenment' ), 'fast-forward' => __( 'fast-forward', 'enlightenment' ), 'file' => __( 'file', 'enlightenment' ), 'film' => __( 'film', 'enlightenment' ), 'filter' => __( 'filter', 'enlightenment' ), 'fire' => __( 'fire', 'enlightenment' ), 'flag' => __( 'flag', 'enlightenment' ), 'flash' => __( 'flash', 'enlightenment' ), 'floppy-disk' => __( 'floppy-disk', 'enlightenment' ), 'floppy-open' => __( 'floppy-open', 'enlightenment' ), 'floppy-remove' => __( 'floppy-remove', 'enlightenment' ), 'floppy-save' => __( 'floppy-save', 'enlightenment' ), 'floppy-saved' => __( 'floppy-saved', 'enlightenment' ), 'folder-close' => __( 'folder-close', 'enlightenment' ), 'folder-open' => __( 'folder-open', 'enlightenment' ), 'font' => __( 'font', 'enlightenment' ), 'forward' => __( 'forward', 'enlightenment' ), 'fullscreen' => __( 'fullscreen', 'enlightenment' ), 'gbp' => __( 'gbp', 'enlightenment' ), 'gift' => __( 'gift', 'enlightenment' ), 'glass' => __( 'glass', 'enlightenment' ), 'globe' => __( 'globe', 'enlightenment' ), 'grain' => __( 'grain', 'enlightenment' ), 'hand-down' => __( 'hand-down', 'enlightenment' ), 'hand-left' => __( 'hand-left', 'enlightenment' ), 'hand-right' => __( 'hand-right', 'enlightenment' ), 'hand-up' => __( 'hand-up', 'enlightenment' ), 'hd-video' => __( 'hd-video', 'enlightenment' ), 'hdd' => __( 'hdd', 'enlightenment' ), 'header' => __( 'header', 'enlightenment' ), 'headphones' => __( 'headphones', 'enlightenment' ), 'heart' => __( 'heart', 'enlightenment' ), 'heart-empty' => __( 'heart-empty', 'enlightenment' ), 'home' => __( 'home', 'enlightenment' ), 'hourglass' => __( 'hourglass', 'enlightenment' ), 'ice-lolly' => __( 'ice-lolly', 'enlightenment' ), 'ice-lolly-tasted' => __( 'ice-lolly-tasted', 'enlightenment' ), 'import' => __( 'import', 'enlightenment' ), 'inbox' => __( 'inbox', 'enlightenment' ), 'indent-left' => __( 'indent-left', 'enlightenment' ), 'indent-right' => __( 'indent-right', 'enlightenment' ), 'info-sign' => __( 'info-sign', 'enlightenment' ), 'italic' => __( 'italic', 'enlightenment' ), 'jpy' => __( 'jpy', 'enlightenment' ), 'king' => __( 'king', 'enlightenment' ), 'knight' => __( 'knight', 'enlightenment' ), 'lamp' => __( 'lamp', 'enlightenment' ), 'leaf' => __( 'leaf', 'enlightenment' ), 'level-up' => __( 'level-up', 'enlightenment' ), 'link' => __( 'link', 'enlightenment' ), 'list' => __( 'list', 'enlightenment' ), 'list-alt' => __( 'list-alt', 'enlightenment' ), 'lock' => __( 'lock', 'enlightenment' ), 'log-in' => __( 'log-in', 'enlightenment' ), 'log-out' => __( 'log-out', 'enlightenment' ), 'magnet' => __( 'magnet', 'enlightenment' ), 'map-marker' => __( 'map-marker', 'enlightenment' ), 'menu-down' => __( 'menu-down', 'enlightenment' ), 'menu-hamburger' => __( 'menu-hamburger', 'enlightenment' ), 'menu-left' => __( 'menu-left', 'enlightenment' ), 'menu-right' => __( 'menu-right', 'enlightenment' ), 'menu-up' => __( 'menu-up', 'enlightenment' ), 'minus' => __( 'minus', 'enlightenment' ), 'minus-sign' => __( 'minus-sign', 'enlightenment' ), 'modal-window' => __( 'modal-window', 'enlightenment' ), 'move' => __( 'move', 'enlightenment' ), 'music' => __( 'music', 'enlightenment' ), 'new-window' => __( 'new-window', 'enlightenment' ), 'object-align-bottom' => __( 'object-align-bottom', 'enlightenment' ), 'object-align-horizontal' => __( 'object-align-horizontal', 'enlightenment' ), 'object-align-left' => __( 'object-align-left', 'enlightenment' ), 'object-align-right' => __( 'object-align-right', 'enlightenment' ), 'object-align-top' => __( 'object-align-top', 'enlightenment' ), 'object-align-vertical' => __( 'object-align-vertical', 'enlightenment' ), 'off' => __( 'off', 'enlightenment' ), 'oil' => __( 'oil', 'enlightenment' ), 'ok' => __( 'ok', 'enlightenment' ), 'ok-circle' => __( 'ok-circle', 'enlightenment' ), 'ok-sign' => __( 'ok-sign', 'enlightenment' ), 'open' => __( 'open', 'enlightenment' ), 'open-file' => __( 'open-file', 'enlightenment' ), 'option-horizontal' => __( 'option-horizontal', 'enlightenment' ), 'option-vertical' => __( 'option-vertical', 'enlightenment' ), 'paperclip' => __( 'paperclip', 'enlightenment' ), 'paste' => __( 'paste', 'enlightenment' ), 'pause' => __( 'pause', 'enlightenment' ), 'pawn' => __( 'pawn', 'enlightenment' ), 'pencil' => __( 'pencil', 'enlightenment' ), 'phone' => __( 'phone', 'enlightenment' ), 'phone-alt' => __( 'phone-alt', 'enlightenment' ), 'picture' => __( 'picture', 'enlightenment' ), 'piggy-bank' => __( 'piggy-bank', 'enlightenment' ), 'plane' => __( 'plane', 'enlightenment' ), 'play' => __( 'play', 'enlightenment' ), 'play-circle' => __( 'play-circle', 'enlightenment' ), 'plus' => __( 'plus', 'enlightenment' ), 'plus-sign' => __( 'plus-sign', 'enlightenment' ), 'print' => __( 'print', 'enlightenment' ), 'pushpin' => __( 'pushpin', 'enlightenment' ), 'qrcode' => __( 'qrcode', 'enlightenment' ), 'queen' => __( 'queen', 'enlightenment' ), 'question-sign' => __( 'question-sign', 'enlightenment' ), 'random' => __( 'random', 'enlightenment' ), 'record' => __( 'record', 'enlightenment' ), 'refresh' => __( 'refresh', 'enlightenment' ), 'registration-mark' => __( 'registration-mark', 'enlightenment' ), 'remove' => __( 'remove', 'enlightenment' ), 'remove-circle' => __( 'remove-circle', 'enlightenment' ), 'remove-sign' => __( 'remove-sign', 'enlightenment' ), 'repeat' => __( 'repeat', 'enlightenment' ), 'resize-full' => __( 'resize-full', 'enlightenment' ), 'resize-horizontal' => __( 'resize-horizontal', 'enlightenment' ), 'resize-small' => __( 'resize-small', 'enlightenment' ), 'resize-vertical' => __( 'resize-vertical', 'enlightenment' ), 'retweet' => __( 'retweet', 'enlightenment' ), 'road' => __( 'road', 'enlightenment' ), 'rub' => __( 'rub', 'enlightenment' ), 'ruble' => __( 'ruble', 'enlightenment' ), 'save' => __( 'save', 'enlightenment' ), 'save-file' => __( 'save-file', 'enlightenment' ), 'saved' => __( 'saved', 'enlightenment' ), 'scale' => __( 'scale', 'enlightenment' ), 'scissors' => __( 'scissors', 'enlightenment' ), 'screenshot' => __( 'screenshot', 'enlightenment' ), 'sd-video' => __( 'sd-video', 'enlightenment' ), 'search' => __( 'search', 'enlightenment' ), 'send' => __( 'send', 'enlightenment' ), 'share' => __( 'share', 'enlightenment' ), 'share-alt' => __( 'share-alt', 'enlightenment' ), 'shopping-cart' => __( 'shopping-cart', 'enlightenment' ), 'signal' => __( 'signal', 'enlightenment' ), 'sort' => __( 'sort', 'enlightenment' ), 'sort-by-alphabet' => __( 'sort-by-alphabet', 'enlightenment' ), 'sort-by-alphabet-alt' => __( 'sort-by-alphabet-alt', 'enlightenment' ), 'sort-by-attributes' => __( 'sort-by-attributes', 'enlightenment' ), 'sort-by-attributes-alt' => __( 'sort-by-attributes-alt', 'enlightenment' ), 'sort-by-order' => __( 'sort-by-order', 'enlightenment' ), 'sort-by-order-alt' => __( 'sort-by-order-alt', 'enlightenment' ), 'sound-5-1' => __( 'sound-5-1', 'enlightenment' ), 'sound-6-1' => __( 'sound-6-1', 'enlightenment' ), 'sound-7-1' => __( 'sound-7-1', 'enlightenment' ), 'sound-dolby' => __( 'sound-dolby', 'enlightenment' ), 'sound-stereo' => __( 'sound-stereo', 'enlightenment' ), 'star' => __( 'star', 'enlightenment' ), 'star-empty' => __( 'star-empty', 'enlightenment' ), 'stats' => __( 'stats', 'enlightenment' ), 'step-backward' => __( 'step-backward', 'enlightenment' ), 'step-forward' => __( 'step-forward', 'enlightenment' ), 'stop' => __( 'stop', 'enlightenment' ), 'subscript' => __( 'subscript', 'enlightenment' ), 'subtitles' => __( 'subtitles', 'enlightenment' ), 'sunglasses' => __( 'sunglasses', 'enlightenment' ), 'superscript' => __( 'superscript', 'enlightenment' ), 'tag' => __( 'tag', 'enlightenment' ), 'tags' => __( 'tags', 'enlightenment' ), 'tasks' => __( 'tasks', 'enlightenment' ), 'tent' => __( 'tent', 'enlightenment' ), 'text-background' => __( 'text-background', 'enlightenment' ), 'text-color' => __( 'text-color', 'enlightenment' ), 'text-height' => __( 'text-height', 'enlightenment' ), 'text-size' => __( 'text-size', 'enlightenment' ), 'text-width' => __( 'text-width', 'enlightenment' ), 'th' => __( 'th', 'enlightenment' ), 'th-large' => __( 'th-large', 'enlightenment' ), 'th-list' => __( 'th-list', 'enlightenment' ), 'thumbs-down' => __( 'thumbs-down', 'enlightenment' ), 'thumbs-up' => __( 'thumbs-up', 'enlightenment' ), 'time' => __( 'time', 'enlightenment' ), 'tint' => __( 'tint', 'enlightenment' ), 'tower' => __( 'tower', 'enlightenment' ), 'transfer' => __( 'transfer', 'enlightenment' ), 'trash' => __( 'trash', 'enlightenment' ), 'tree-conifer' => __( 'tree-conifer', 'enlightenment' ), 'tree-deciduous' => __( 'tree-deciduous', 'enlightenment' ), 'triangle-bottom' => __( 'triangle-bottom', 'enlightenment' ), 'triangle-left' => __( 'triangle-left', 'enlightenment' ), 'triangle-right' => __( 'triangle-right', 'enlightenment' ), 'triangle-top' => __( 'triangle-top', 'enlightenment' ), 'unchecked' => __( 'unchecked', 'enlightenment' ), 'upload' => __( 'upload', 'enlightenment' ), 'usd' => __( 'usd', 'enlightenment' ), 'user' => __( 'user', 'enlightenment' ), 'volume-down' => __( 'volume-down', 'enlightenment' ), 'volume-off' => __( 'volume-off', 'enlightenment' ), 'volume-up' => __( 'volume-up', 'enlightenment' ), 'warning-sign' => __( 'warning-sign', 'enlightenment' ), 'wrench' => __( 'wrench', 'enlightenment' ), 'xbt' => __( 'xbt', 'enlightenment' ), 'yen' => __( 'yen', 'enlightenment' ), 'zoom-in' => __( 'zoom-in', 'enlightenment' ), 'zoom-out' => __( 'zoom-out', 'enlightenment' ), ) ); } ?>
Tagged: glyphicons menu
You must be logged in to reply to this topic.