• Hi!

    I just loaded through font-face CSS a custom icon font I made with icomoon. I tried in one post and it is working, but when I add it to the service icon I get only a square inside the “circle”.

    How can I get it working?

    Thanks.

    bms.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, for the default, the theme are using fontawesome and there is different ways how to use both of those fonts to the site.

    In this theme, you need to open wp-services.php, try to find this line <?php $icon_html = '<span class="service-icon wow zoomInDown">' . '<i class="fa ' . esc_html($icon) . '"></i>' . '</span>'; ?> then you can edit those line in accordance with the setting of how to use the icomoon in HTML

    Take a note that you edit the file within your child theme

    Thread Starter bodymindsoultraining

    (@bodymindsoultraining)

    Hi!
    Thanks for the hint!
    I’m close but the changes didn’t take effect.

    I changed the file so now the lines look like:
    <span class=”service-icon wow zoomInDown”><?php echo ‘<i class=”icon- ‘ . esc_html($icon) . ‘”></i>’; ?></span>

    But when I inspect the element I get
    fa icon-whatever the icon.

    So something is overriding this area. Is it possible?

    Do you know a way to have two font classes so I can use both FontAwesome Icons and my custom icons?

    Thanks!

    Regards

    I think you missed the step how to use icomoon.

    you have to change this line <?php $icon_html = '<span class="service-icon wow zoomInDown">' . '<i class="fa ' . esc_html($icon) . '"></i>' . '</span>'; ?>
    to <?php $icon_html = '<span aria-hidden="true" data-icon="' . esc_html($icon) . '" class="down-arrow"></span>'; (https://chipcullen.com/how-to-use-icomoon-and-icon-fonts-part-1-basic-usage)

    you can use both icon, and here is the example how to use fontawesome https://fontawesome.io/examples/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Icon font In Service Icon’ is closed to new replies.