Home › Forums › Front-end Issues › ACF-ICON not working on Front-End
Hi all,
I’m using my custom made theme for WP and problem is that the icon like:
class=”acf-icon -cancel grey” –> this is x
class=”acf-icon -plus small acf-js-tooltip hide-on-shift” –> this is plus for add row
class=”acf-icon -minus small acf-js-tooltip” –> this is minus for deleting row in repeater field….
All this icon not working on Front-End on Back-End working normaly. What can be wrong?
I’m confused, are you using acf_form() to show a form and the icons are not appearing?
Yes, so i guess that is problem in my custom made theme. But i cant find what.
Open wp-config.php and add the following line
define('SCRIPT_DEBUG', true);
and let me know if this corrects the problem.
I thought you might have a corrupt CSS file…
I’m out of ideas that I can help with other than starting to deactivate plugins and switch themes to figure try to figure out where the issue is an narrow it down.
I was dealing with the same problem recently and found out this was because of not loading WP ‘dashicons’ font in frontend. Is it supposed to load by default?
Anyway, you can try this:
add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' );
function load_dashicons_front_end() {
wp_enqueue_style( 'dashicons' );
}
It would be nicer if acf would load such icons from it’s css as inline svg for example.
It appears that dashicons is only loaded on the front if you’re logged in. This could be a bug and ACF should probably be loading dasicons on pages where acf_form_head() is used. You should submit a bug report here https://www.advancedcustomfields.com/contact/
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.