Site logo

Archived topic

Where can I put code to Font Awesome?

11 replies · Started by Jesús on December 3, 2018

Viewing posts 1–12 of 12

Hello!

My icons don´t show to menu. I´ve installed plugin Awesome but I think that I need this:

add_action ('wp_enqueue_scripts', 'tu_load_font_awesome');
/ **
 * Enqueue Font Awesome.
 * /
función tu_load_font_awesome () {
    wp_enqueue_style ('font-awesome', '//use.fontawesome.com/releases/v5.3.1/css/all.css', array (), '5.3.1');
}

https://docs.generatepress.com/article/font-awesome/

But... Where can I put this code? ¿Functions.php?

Thanks!

Hello!

I don´t know what I´m doing bad...

1. I´ve created a theme child.
2. I´ve added the function and plugin of Font awesome.
3. I insert this:

And not work :(

Looks like it should work.

Any chance you can link us to the site in question?

You can edit the original topic and use the private URL field.

Let me know :)

Hello Leo!

I´ve added my web in my post.

Thank!

Can you clear and then disable the caching plugin to test?

I´ve cleaning caché, regenerate css, purge the url.. and i´ve disable the plugin to cache but not work :(
You can checked.

Have you other idea? :)

A plugin you're using is adding Font Awesome 4.7 improperly. They should be adding the version number so WordPress uses the latest version (your function).

Since this plugin is adding 4.7 anyways, you might as well use those icons: https://fontawesome.com/v4.7.0/

Yes!

Perhaps, I use too Menu Icons!
Could I resize the space between icons? I´m using: menu-item-float-right But space between icons is a little big...

Thank you!

Hi there,

try this CSS:

.main-navigation ul li.menu-item-float-right a {
    padding-left: 15px;
    padding-right: 15px;
}

wow, this work!

Thank you! :)

You're welcome. Glad we could be of help.

This archived topic is closed to new replies.