{"id":18465798,"date":"2025-05-14T15:28:15","date_gmt":"2025-05-14T15:28:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/some-custom-icons-not-displaying-correctly\/"},"modified":"2025-05-14T15:28:15","modified_gmt":"2025-05-14T15:28:15","slug":"some-custom-icons-not-displaying-correctly","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/some-custom-icons-not-displaying-correctly\/","title":{"rendered":"Some custom icons not displaying correctly"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I\u2019m having an issue but just with SOME of our custom icons which seems extra hard to troubleshoot. They are all being pulled in the same way and all part of the same kit. I reached out to Font Awesome support who said that the issue is because, &#8220;there is an extra class on there &#8220;fa-custom&#8221; that is messing things up&#8221; and to remove it. However some of the icons with the class still displayed and eventually we figured out it was because, &#8220;We were able to figure out the root issue with your custom icons. Any class that starts with &#8220;fa-&#8221; is interpreted by our javascript as something it should pay attention to, so generally you should avoid adding classes that start with &#8220;fa-&#8221; to your html.\u00a0As for the change in behavior, in our Version 6.7.0 release we adjusted how our script looks at the classes it finds on an html element. It now sorts the classes in alphabetical order before processing (to be able to handle some of our newer Duotone icons) which changed the behavior of a class like &#8220;fa-custom&#8221;. Before the release, if an unknown class starting with &#8220;fa-&#8221; came before the icon name (like &#8220;fa-coffee-table&#8221;) the icon would work but not if it came after. Now, if the icon name comes alphabetically before the unknown class name, it won&#8217;t work. So &#8220;fa-coffee-table&#8221; comes alphabetically before &#8220;fa-custom&#8221; which results in a missing icon &#8211; but a name like &#8220;fa-drapes&#8221; comes alphabetically after &#8220;fa-custom&#8221; so it will work, which explains why only some of your custom icons were having issues. Long story short, they best fix is to remove the &#8220;fa-custom&#8221; class or rename it to &#8220;custom-icon&#8221; &#8211; anything without &#8220;fa-&#8221; at the beginning.&#8221;<br \/><br \/>However because the class is coming from the ACF:fontawesome plugin I can&#8217;t adjust it. While working with FontAwesome they said, &#8220;We were able to connect with Matt, the developer of Advanced Custom Fields: Font Awesome, and he confirmed that that the extra &#8220;fa-custom&#8221; class is coming from the plugin. He suggested that you could change the &#8220;Return Value&#8221; to &#8220;Icon Object&#8221; instead of &#8220;Icon Element&#8221; to control the code that the plugin outputs so you can remove the &#8220;fa-custom&#8221; class.&#8221;<br \/><br \/>I have switched the &#8220;Return Value&#8221; to &#8220;Icon Object&#8221; and am continuing to have the same issue. Is there something else I need to do to solve this?<\/p>\n","protected":false},"template":"","class_list":["post-18465798","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18465798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18465798\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18465798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}