{"id":362,"date":"2015-03-12T18:15:51","date_gmt":"2015-03-12T18:15:51","guid":{"rendered":"https:\/\/www.megamenu.com\/?page_id=362"},"modified":"2025-03-27T10:06:11","modified_gmt":"2025-03-27T10:06:11","slug":"font-awesome","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/font-awesome\/","title":{"rendered":"Font Awesome"},"content":{"rendered":"\r\n<p>Max Mega Menu has built in support for Font Awesome 6. It also includes compatibility for Font Awesome Pro when using the official Font Awesome plugin.<\/p>\r\n\r\n\r\n\r\n<p>To add a Font Awesome icon to a menu item, open the Mega Menu settings for the menu item and click the \u2018Icon\u2019 tab. You will see a list of available icon types listed across the top of the page. Select \u2018Font Awesome&#8217; then select the icon you would like to use.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full alignnone\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2962\" height=\"1642\" class=\"wp-image-398555\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome.png\" alt=\"\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome.png 2962w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-300x166.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-1024x568.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-768x426.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-50x28.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-1536x851.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-2048x1135.png 2048w\" sizes=\"auto, (max-width: 2962px) 100vw, 2962px\" \/><\/a>\r\n<figcaption class=\"wp-element-caption\">Font Awesome<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Troubleshooting<\/h4>\r\n\r\n\r\n\r\n<p>If the icons are not appearing on the front end, go to <em>Mega Menu &gt; Tools<\/em> and clear the CSS cache (you will only need to do this once).<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Equal Width Icons<\/h4>\r\n\r\n\r\n\r\n<p>Font Awesome icons are output at varying widths depending on the icon chosen. When displaying icons next to menu items in a vertical list, the varying with of the icons can make the menu item text appear as if it is not lined up correctly. To set a fixed width on the icons, go to <em>Mega Menu &gt; Menu Themes &gt; Custom Styling<\/em> and add the following:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">#{$wrap} #{$menu} ul.mega-sub-menu li.mega-menu-item a[class^='fa']:before {\r\n  width: 1.25em;\r\n  text-align: center;\r\n}<\/pre>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Dequeueing Styles<\/h4>\r\n\r\n\r\n\r\n<p>Max Mega Menu will automatically include the required Font Awesome CSS on your site. If your theme already uses Font Awesome, you can prevent Max Mega Menu from outputting a duplicate copy of the CSS. Go to <em>Mega Menu &gt; General Settings<\/em> and uncheck the relevant &#8220;Font Awesome&#8221; option:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2962\" height=\"1710\" class=\"wp-image-398557\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue.png\" alt=\"\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue.png 2962w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue-300x173.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue-1024x591.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue-768x443.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue-50x29.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue-1536x887.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-dequeue-2048x1182.png 2048w\" sizes=\"auto, (max-width: 2962px) 100vw, 2962px\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Using Font Awesome for your sub menu arrow indicators<\/h4>\r\n\r\n\r\n\r\n<p>Add the following to your child themes functions.php file:<\/p>\r\n\r\n\r\n\r\n<pre class=\"lang:default decode:true wp-block-preformatted \">function megamenu_use_fontawesome_arrows( $vars, $location, $theme, $menu_id, $theme_id ) {\t\r\n\t$vars['arrow_font'] = \"var(--fa-style-family-classic)\";\t\r\n\t$vars['arrow_font_weight'] = \"900\";\t\r\n\t$vars['arrow_up'] = \"'\\\\f106'\";\t\r\n\t$vars['arrow_down'] = \"'\\\\f107'\";\t\r\n\t$vars['arrow_left'] = \"'\\\\f104'\";\t\r\n\t$vars['arrow_right'] = \"'\\\\f105'\";\t\r\n\treturn $vars;\r\n}\r\nadd_filter( \"megamenu_scss_variables\", \"megamenu_use_fontawesome_arrows\", 10, 5 );<\/pre>\r\n\r\n\r\n\r\n<p>After adding the code, go to <em>Mega Menu &gt; Tools<\/em> and clear the CSS cache.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Using Font Awesome 6 Pro<\/h3>\r\n\r\n\r\n\r\n<p>If you have a Font Awesome Pro subscription, you can can use the Font Awesome plugin to load Font Awesome Pro on your site. Select a &#8220;Use a Kit&#8221; option and configure it using your API key.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2962\" height=\"1710\" class=\"wp-image-398559\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit.png\" alt=\"\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit.png 2962w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit-300x173.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit-1024x591.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit-768x443.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit-50x29.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit-1536x887.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-kit-2048x1182.png 2048w\" sizes=\"auto, (max-width: 2962px) 100vw, 2962px\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>If you are loading Font Awesome Pro using your own method (make sure it is loaded correctly on both the front end and the back end), add the following to your wp-config.php file to let Max Mega Menu know that Pro is in use:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>define('MEGAMENU_PRO_USE_FONTAWESOME6_PRO', true);<\/code><\/pre>\r\n\r\n\r\n\r\n<p>You should now prevent Max Mega Menu from loading its own copy of Font Awesome under <em>Mega Menu &gt; General Settings<\/em>.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Using Light icons<\/h4>\r\n\r\n\r\n\r\n<p>By default the icons will be output in the &#8216;solid&#8217; style. To change them to the &#8216;light&#8217; style (requires Font Awesome Pro), go to <em>Mega Menu &gt; Menu Themes &gt; Custom Styling<\/em> and add the following:<\/p>\r\n<pre class=\"lang:default decode:true \">#{$wrap} #{$menu} li.mega-menu-item &gt; a.fa6.fas:before { \r\n    font: var(--fa-font-light); \r\n}<\/pre>\r\n\r\n\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Adding Font Awesome Pro Icons to the picker<\/h4>\r\n\r\n\r\n\r\n<p>To add Pro icons to the picker, find the icon you want to add in the <a href=\"https:\/\/fontawesome.com\/icons?d=gallery&amp;p=2&amp;m=pro\">icon directory<\/a> and copy the unicode and css class.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" class=\"wp-image-398565\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-1024x600.png\" alt=\"\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-1024x600.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-300x176.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-768x450.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-50x29.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-1536x900.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-class-unicode-2048x1201.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>Add the following to your functions.php file, following the same format for your selected icons:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">function megamenu_add_fontawesome_pro_icons($icons) {\r\n\t\/\/ solid icons (fa-solid)\r\n\t$icons[\"fa-f6b0\"] = \"fa-solid fa-alicorn\";\r\n\r\n\t\/\/ light icons (fa-light)\r\n\t$icons[\"fa-f6ae\"] = \"fa-light fa-acorn\";\r\n\t\r\n\t\/\/ regular icons (fa-regular)\r\n\t$icons[\"fa-f819\"] = \"fa-regular fa-popcorn\";\r\n\r\n\treturn $icons;\r\n}\r\nadd_filter(\"megamenu_fontawesome_6_icons\", \"megamenu_add_fontawesome_pro_icons\");<\/pre>\r\n\r\n\r\n\r\n<p>Your new icons will appear at the end of the list of Font Awesome icons:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2822\" height=\"1528\" class=\"wp-image-398564\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons.png\" alt=\"\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons.png 2822w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons-300x162.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons-1024x554.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons-768x416.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons-50x27.png 50w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons-1536x832.png 1536w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2023\/11\/fontawesome-extra-icons-2048x1109.png 2048w\" sizes=\"auto, (max-width: 2822px) 100vw, 2822px\" \/><\/a><\/figure>\r\n","protected":false},"excerpt":{"rendered":"<p>Max Mega Menu has built in support for Font Awesome 6. It also includes compatibility for Font Awesome Pro when using the official Font Awesome plugin. To add a Font Awesome icon to a menu item, open the Mega Menu settings for the menu item and click the \u2018Icon\u2019 tab&#8230;.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[16],"ht-kb-tag":[],"class_list":["post-362","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-pro-features"],"uagb_featured_image_src":[],"uagb_author_info":{"display_name":"Tom Hemsley","author_link":"https:\/\/www.megamenu.com\/author\/megamenu\/"},"uagb_comment_info":0,"uagb_excerpt":"Max Mega Menu has built in support for Font Awesome 6. It also includes compatibility for Font Awesome Pro when using the official Font Awesome plugin. To add a Font Awesome icon to a menu item, open the Mega Menu settings for the menu item and click the \u2018Icon\u2019 tab....","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":29,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/362\/revisions"}],"predecessor-version":[{"id":424168,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/362\/revisions\/424168"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=362"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}