Support » Plugin: Advanced Custom Fields: Font Awesome Field » Icon not vissible

  • Resolved michaaeell


    I tried to display the font-awesome icon on my page but it is not visible.
    In the php code, I use <?php the_field('icone'); ?>. On the page, I filled in the ACF field with an icon (field name is also ‘icone’). However, the icon is not shown on the page…

    Any ideas? Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Keys


    Hey @michaaeell,

    If you are familiar with using your browsers inspector tool, you should be able to use that to view the source code where your icon should be appearing, and verify that the expected HTML is being output.

    Assuming that you are seeing what you should (probably something like <i class="fad fa-address-book"></i> ), you can then move on to figuring out why the icon isn’t showing. This is most likely that the FontAwesome CSS is not loading, or multiple conflicting versions are loading.

    When you created the field in ACF with my plugin, there is an option there for loading the FontAwesome CSS. If you aren’t loading it yourself through your theme (and you theme doesn’t come with it), you should use that option.

    If you are loading it yourself, or if your theme is, you should make sure it is the correct (latest) version that includes the icon you selected.

    I hope this helps!

    Thread Starter michaaeell


    Thanks for your replay! In the HTML, the place where the icon should be, does not contain anything… I am using the icon within a repeater group, does that make a difference or is that not relevant?

    Plugin Author Matt Keys


    Yes that is very relevant. When using repeaters with ACF (with my field or otherwise), you must use the_sub_field() or get_sub_field() functions. The first is to echo the value, the second is to return the value. That would explain why you are not seeing anything.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Icon not vissible’ is closed to new replies.