Okay
  Public Ticket #3298926
How can I change the path to use local Font Awesome in Salient Theme
Closed

Comments

  • enickel started the conversation

    I want to change the path of used font Awesome from salient theme. The theme should get the fonts from local Font Awsome.

  •  8,939
    Tahir replied

    Hey Again,

    Not sure i understand the issue as the fontawesome file is loading in Salient from the Theme folder. If you wish to load it from a CDN you can use the Official Fontawesome Plugin: https://wordpress.org/plugins/font-awesome/ .

     Thanks


    ThemeNectar Support Team 

  • enickel replied

    Hi Tahir, thank you for the quick response. That’s not what I mean. I want host the font awesome locally on my server. But for this I need to change the path, that the theme icons in the footer use the local path and not the original font awesome path. I copied font awesome css-and font-folder already  to my theme. 

    Do you have an idea?

  •  8,939
    Tahir replied

    Please add this to your child Theme Functions.php :

    wp_enqueue_style('font-awesome-salient', get_template_directory_uri() . '/css/font-awesome.min.css');
    

    So the Child Theme Code Looks Like This: 

    add_action( 'wp_enqueue_scripts', 'salient_child_enqueue_styles');
    function salient_child_enqueue_styles() {
       wp_enqueue_style('font-awesome-salient', get_template_directory_uri() . '/css/font-awesome.min.css');
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css', array('font-awesome'));
        if ( is_rtl() )
                wp_enqueue_style(  'salient-rtl',  get_template_directory_uri(). '/rtl.css', array(), '1', 'screen' );
    }

    Thanks 


    ThemeNectar Support Team 

  • enickel replied

    Hey Tahir,


    thank you very much for the code. I think it works, but two fonts (fa-brands, fa-solid) are still loaded directly from font awesome. Please check the screenshot. Do you have an idea?

    Attached files:  571FCF27-65C6-4B0D-847B-7432364A6256.jpeg

  •  8,939
    Tahir replied

    Hey Again,

    Try using the "Query Monitor" Plugin to check which plugin is adding that as its not coming from the Salient Theme . 

    Thanks 


    ThemeNectar Support Team 

  • enickel replied

    Hi Tahir,


    so far I could figure out font awesome is still loaded by the header. Please check the photo. How can I change this icons to local path?

    Attached files:  5370109E-780E-4067-A205-C8D0B7C0357C.jpeg

  •  8,939
    Tahir replied

    Please check which plugin is loading the "bfa-fontawesome" file. Do you have a Third Party Plugin with the bfa initials ?.

    Thanks


    ThemeNectar Support Team