开发者 | New Nine |
---|---|
更新时间 | 2016年11月2日 05:26 |
PHP版本: | 3 及以上 |
WordPress版本: | 4.6.1 |
版权: | GPLv2 |
版权网址: | 版权信息 |
n9m-font-awesome-4
into the /wp-content/plugins/
directory.
Then, activate the plugin through the 'Plugins' menu in WordPress.Head over to the Font Awesome website to find a full list of icons available. Don't forget to check out the examples page to see how you can mix and match icons for new effects.
Go to Appearance -> Menus, select which menu item to which you want to add the icon, and add the icon class(es) under 'CSS Classes (optional)'. (eg, to add the home icon to your 'Home' link, enter "fa-home" (without quotes) as a class. To make it spin, add "fa-home fa-spin" as your classes.) Save your menu and voila! Want to add an icon to a post or page? Use the shortcodes available:
<i class="fa fa-home"></i>
<i class="fa fa-facebook"></i>
Add "fa-after" (excluding the quotes) as one of your classes and the icon will show up after your text.
Under Appearance -> Menus, click 'Screen Options' (top right of screen) and make sure that 'CSS Classes' is checked. If not - check it!
Yes. Font Awesome menus adds a space between the icon and the text, and wraps that portion in a span with a class of "fontawesome-text". To hide the text and just show the icon, you can put .fontawesome-text {display: none;}
in your stylesheet.
We have also added an administrative option under Settings->Font Awesome so you can delete the space before or after the text and really take full control of your style and layout.
Yes! Go to Settings->Font Awesome and choose how you want Font Awesome 4 loaded. You can use the default (locally from the plugin), you can use the official MaxCDN version, you can set your own url or CDN path, or you can tell the plugin NOT to load the stylesheet at all but still enjoy the Font Awesome Menus.
No. On your site, Font Awesome 4 Menus will load one of four ways depending on how you set it up:
Your site will be fine. Where you used Font Awesome 4 Menus, those menu items will just have additional classes (fa-whatever) that you can erase or ignore (or style differently). If you uninstall the plugin, Font Awesome 4 Menus cleans up after itself by removing the site option and user meta that it set in your database. No bloat here and we clean up after ourselves!
nav_menu_css_class()
by removing unused parameters