Advanced Custom Fields: Font Awesome
Versione 4.1.1
WordPress 6.6.2
Clean Photo WP Theme Versione: 1.7
quando attivo il plugin si blocca il sito
grazie
When using the plugin with v6x icons wp-graphql incorrectly returns an object when the field settings are set to return a class. This is not the case with v5x icons.
Is there something that can be done about this issue?
Please see attached images that hopefully demonstrate.
We are using this on quite a number of client sites and it’s breaking front ends when people want to upgrade to v6 icons so hoping there is a possible fix for this. I’m assuming the issue is with the plugin and not wp-graphql. Please correct me if I’m wrong and I’ll open an issue there instead.
thanks :o)
Hello,
we currently have a problem where the font awesome field throws a critical error when the field is getting displayed in the backend (where normally the icon selection appears). This is probably due to the usage of the Avada theme since we didn’t have that problem before. Despite what settings are used in the field (enquee font awesome, display icon, …) nothing chages this behaviour. Maybe this is due to avadas own integration of font awesome and also ACF? Could you help with that?
Kind regards,
Jonas
]]>I am encountering several issues with the ACF Font Awesome field plugin on my WordPress site:
I have ensured that both the ACF and Font Awesome field plugins are up-to-date. I have also tried deactivating other plugins and switching to a default theme to rule out conflicts. Despite these steps, the issues persist.
I’ve was able to “bypass” these issues in the past by manually placing the generated code in my theme and changing the settings that way, but this does not work anymore.
]]>The Plugin doesn’t show the icon selection in the admin anymore.
I just see the message the results can not be loaded.
In the log I got :
[16-Jul-2024 08:21:55 UTC] PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in …/wp-content/plugins/advanced-custom-fields-font-awesome/assets/inc/class-ACFFA-Loader-6.php:202
Stack trace: 0 …wp-content/plugins/advanced-custom-fields-font-awesome/assets/inc/class-ACFFA-Loader-6.php(202): in_array(‘kit_custom’, ”) 1 …/wp-content/plugins/advanced-custom-fields-font-awesome/assets/inc/class-ACFFA-Loader-6.php(55): ACFFA_Loader_6->get_ajax_query(Array) 2 …/wp-includes/class-wp-hook.php(324): ACFFA_Loader_6->select2_ajax_request(”) 3 …/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 4 /home/www/dev/feda/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 5 /–/wp-admin/admin-ajax.php(192): do_action(‘wp_ajax_acf/fie…’) 6 {main}
thrown in …/wp-content/plugins/advanced-custom-fields-font-awesome/assets/inc/class-ACFFA-Loader-6.php on line 202
I add a token and a set with my free FA account, still the same.
I disabled really everything in WP and the functions, still the same.
I use the 4.0.9 version, the current versions of ACF Pro and WP. PHP is 8.1 (staging) and 8.2 (live)
Hi!,
Thanks for taking the time to read my question/support question; it may be something really simple but I still can’t find the way to do it.
I have the select Icon field + image field, so you can choose to updload or select an icon, depending of the need; altho I know I can simply hide one option if the other is active, I still require to have the chance to deselect any icon value that the selector has so, when it saved, only the image or even NONE get saved.
How to do this? I hope to have explained good enough myself.
Thank you in advance.
]]>Hi,
The custom icon set doesn’t show pro icons even if I have the API key inserted. What’s the issue here?
All the best,
Patrick
Hello, long time user of the plugin!
I see some other support topics that are similar to this, so hoping it’s related, but our issue is slightly different than anything else I’ve read about. We have some custom icons that we pull in from the Kit, that stopped rendering when we upgraded beyond 4.0.6.
The previously outputted HTML that works looks like this:
<i class=”fak fa-furnace-dark” aria-hidden=”true”></i>
After the update, the outputted HTML that is now broken looks like this:
<i class=”fa-classic fa-fak fa-furnace-dark” aria-hidden=”true”></i>
If I remove the “fa-classic” and replace “fa-fak” with “fak” so that the HTML looks the same as it used to, everything works again. Obviously this is not a full-time solution, so for now we’ve rolled things back to 4.0.6 but would very much like to keep things up to date.
Let me know if you need any other info from my end!
]]>I updated the plugin to 4.0.8 and my custom fontawesome kit icons no longer render on the front end using echo $icon->svg->element as the element string doesn’t contain the <svg> tag anymore, only the <path> for the SVG. If I roll the plugin back to 4.0.5 it works as it always has and the wrapping svg tag is included.
]]>When I add my API token and save settings, it won’t pull my (Pro) kit and I get the following message:
Token Validation:?Could not validate token. Please verify the token has been correctly entered.
I found an earlier example here: https://www.ads-software.com/support/topic/api-token-issues/
I don’t know how to resolve this issue. I would be grateful for any help.
]]>Hi there, I get a white screen when editing a CPT where I use this icon ACF field, settings using FA5. The issue, it seems, is here in /fields/acf-font-awesome-v5.php
// Original problematic code
$prefix = substr( $select_value, 0, 3 );
// Modified code with checks to ensure $select_value is a string
if (is_array($select_value)) {
error_log("Expected string, got array. Variable contents: " . print_r($select_value, true));
$select_value = ''; // Set to empty string or handle appropriately
}
$prefix = substr( $select_value, 0, 3 ); // This is the line where we ensure $select_value is a string
I thought I would share in case anyone else has the issue
]]>After the most recent update, brand icons, specifically linkedin, don’t seem to be working in the frontend although I can select them and they render ok in the gutenberg preview in the admin area. It does flash up for a moment before switching to the broken question mark in a circle.
I’m adding the field to a repeater using the ACF API like this:
acf_add_local_field([
'key' => 'small_icon_list_icon',
'label' => 'Icon',
'name' => 'small_icon_list_icon',
'type' => 'font-awesome',
'parent' => 'small_list_items',
]);
I did wonder if I need to specify the icon sets in the code like this:
acf_add_local_field([
'key' => 'small_icon_list_icon',
'label' => 'Icon',
'name' => 'small_icon_list_icon',
'type' => 'font-awesome',
'parent' => 'small_list_items',
'icon_sets' => ['brands', 'duotone'],
]);
But that seems to break things further.
Thanks for your help and making a great plugin!
]]>I have a small problem with the plugin and hard codes icons. If I use the plugin with a pro kit and create a page and load icons on it via acf, all icons on that page work. Also the icons that are hardcoded. But if I don’t use an icon field on a page template, then all hardcoded icons don’t work either. If I then load fontawsome locally, the icons via the plugin do not work again. How can I make my hardcoded icons work on pages where the ACF fontawsome plugin is not used?
Thanks in advance.
]]>Long-time user, love this plugin!
I’m running into an issue when trying to output custom icons. I can get them to display, but I also get a PHP warning:
Warning: Array to string conversion in /srv/…/plugins/advanced-custom-fields-font-awesome/fields/acf-font-awesome-v6.php on line 355
$icon = get_field('fa');
)I used Font Awesome’s Icon Wizard to create a new custom icon, added it to a kit, and was able to select the new icon. The icon successfully appears on the backend of WordPress but not the frontend: https://share.zight.com/Z4uN6QbB.
]]>Hi,
Is there a list of the new classes added for icons? There is a newly added “fa-classic” that didn’t exist before but is now the default and breaks some functionality we were using to grab icons from classes.
]]>Hey there,
I’m having issues getting icons selected from any acf font awesome icon field to show up in the full site editor. The search drop down works fine to filter through icons, it displays the icons correctly. However once I select one, it doesn’t appear in the block I’m adding it to in the preview section.
For example, if I got to add a facebook link icon to our header template nothing get’s added. If I inspect the section where it should be showing, I can see that it’s adding <i class="fa-brands fa-facebook"></i>
correctly to the code. But it doesn’t look like it’s getting whatever it needs to add the :before
pseudo selector.
Everything works fine in the regular block editor and on the front end, the issue appears to be only when editing or viewing blocks in the FSE.
I inspected the <head>
section and it looks like font awesome is being added correctly in FSE instances, so I’m at a loss for why it’s not working.
If anyone has any suggestions or might be able to help with what I may be doing wrong, that would be greatly appreciated!
]]>Hi Matt
I’m using your development version of the plugin.
In our fontawesome kit we have created a subset of solid icons. The problem is that all solid icons are shown in the dropdown, but only some should be available. It’s not a super big problem because it’s obvious which icons are available or not, but it would be nice if the list would only show the icons that we actually support.
If there’s a solution that involves writing some code, that’s also fine ??
]]>Hi Matt –
Just wanted to note that the newest ACF versions that have deployed more sanitizing of code by default are making this display not look ideal.
It’s all technically still working… just not as beautiful as it used to be with the icons actually able to render inline within the dropdown.
Actually the select dropdown results are still looking good – just not the single selected value:
I recognize that this is an ACF and select2 issue and not actually anything to do directly with your plugin. (This same issues is actually affecting us in a few other spots as well where we have hooked into the result values of select fields.) I did reach out to the ACF support team already and they said the following:
The issue is actually by design, that HTML is escaped for security reasons. This was put in during our last update.
?
There will be an option to get this working in an future update to?ACF.
We do not have an ETA for that.
?
Hope this clears things up.
Not sure if there’s anything to be done about it right away, but I did want to bring it to your attention on the off chance you were not aware already. Plus I also thought with 100k+ active users for this plugin, maybe the ACF team would put a little more urgency behind this fix if they heard from you about it as well.
Thanks for the awesome plugin!
]]>I guess this would be a feature request, but would it be possible to hide the various project names under kits? Or perhaps select by token, etc? Since I am using the same FA account for various clients, but would not want clients able to see other kits other than their own. I suppose the same goes with the API token, if there was a filter where we could add it in code vs in the CMS.
Thanks for all of your hard work on this fantastic plugin!
I have installed your plugin, and used it to call a Font Awesome Field in my Post Edit screen, as you can see here– https://prnt.sc/MVwaQgbTlPL-
The problem is that Elementor Pro doesn’t have Dynamic Tags for Icons, as you can see here– https://prnt.sc/mBn_NflNxhb2
So I am not able to pull the Font Awesome Field into my Elementor Template design, to show it on the frontend of my website.
Can you Please design an Elementor Template, with the ACF Font Awesome Icon Field added, then show this on the frontend?
2.) Can you give me a Step by Step guide on how you achieved it?
Needing to hear from you soon.
Regards.
]]>Hi, I’m referring to this topic of 2 years ago: https://www.ads-software.com/support/topic/multisite-support-382/
We are having the same problem: we have a multisite network with FA pro, where it seems that we need to include the api key in every single website we set up. We will probably write a custom function that adds the key dynamically to each website since we don’t want to do this manually, but just wondering if you have been able to work out something structurally in the meanwhile?
Hi
It doesn’t populate the icon dropdown. It shows the following JS error in console.
Uncaught Error: No select2/compat/dropdownCss
at j (select2.min.js?ver=4.0.5:1:1545)
at o (select2.min.js?ver=4.0.5:1:2868)
at select2.min.js?ver=4.0.5:1:1335
at D.apply (select2.min.js?ver=4.0.5:1:51166)
at new e (select2.min.js?ver=4.0.5:1:53624)
at new e (select2.min.js?ver=4.0.5:1:55677)
at HTMLSelectElement. (select2.min.js?ver=4.0.5:1:64734)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)
at e..each (jquery.min.js?ver=3.7.0:2:1594)
at a.fn.select2 (select2.min.js?ver=4.0.5:1:64694)
Hi,
I would like to translate your plugin (Acf Font) into French but this is not possible via the WordPress collaborative tool.
Would you have time to do this by adding in the plugin:
=> advanced-custom-fields-font-awesome/acf-font-awesome.php
Documentation & Page for translate
This plugin is really cool. Even more if we could translate it ??
Thank you and see you soon
Emilien
Hi!
Thanks for the amazing plugin.
Would you consider providing the ability to add the API Token for v6 via a wp-config.php definition?
Would be lovely to avoid storing it in the database in plain text and having it available on the settings screen, even after it’s been entered.
]]>Hello! Thank you for a great plugin! I saw another thread about Sharp icon support from awhile back, was wondering if this is in the works? Thank you again! ??
]]>Inside a repeater, I am able to create the select list that allows the icon to be selected. I also have a text description field in the repeater.
When I retrieve all the entries of the repeater in the loop, both ACF repeater fields are detected by Bricks and can be assigned to a display element. I see the reference to the Font awesome field {acf_icon_field_name}
When I try to show the elements on a page, the text field displays but the icon does not. I have tried all the return types.
Hi
The problem is: the plugin tries to load the fontawesome css, but it gets 404 as response for the 6.5.0 version. The following link https://use.fontawesome.com/releases/v6.5.0/css/all.css?ver=6.5.0 will not load, but will work as expected with https://use.fontawesome.com/releases/v6.5.0/css/all.css?ver=6.5 or without the “ver” query param.
Previous versions are working fine.
I’m not sure if this is a plugin issue or something on the fontawesome end but I though was better to report it anyway.
]]>Hi there
I am using the plugin with ACF. I have a pro subscription to fa and I am trying to add the icon: https://fontawesome.com/icons/xmark-to-slot?f=classic&s=thin
But no matter how I search I cannot find it. Any ideas what I am doing wrong?
]]>Hi all,
So I am accessing the font awesome field that is in a repeater. I am accessing this data in a loop via a get_post_meta.
$sub_field_value_icon = get_post_meta(get_sub_field(“person”), $meta_key_icon, true);
This returns me the object and not the element as I have selected in the settings in ACF. Regardless of what I change that to, I keep getting the whole object, that looks like this on return.
{ “style” : “brands”, “id” : “linkedin”, “label” : “LinkedIn”, “unicode” : “f08c” }
I have used the plugin many times and had no problem accessing the class but I have also done so in a CPT WP Query and not in the get_post_meta…
What am I doing wrong here and how can I access the element. It looks like the class isn’t even in the object so I can’t even try and work with it.
Thanks for the help!
]]>