[Resolved] Fontawesome On Single Posts But Not Home

Home Forums Support [Resolved] Fontawesome On Single Posts But Not Home

Home Forums Support Fontawesome On Single Posts But Not Home

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #757568
    Jose

    I added <i class=”fa fa-twitter” aria-hidden=”true”></i> to the menu but it only works on the single pages, but not the home page.

    #757629
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try #1 here to eliminate any plugin conflicts first?
    https://docs.generatepress.com/article/debugging-tips/

    Let me know ๐Ÿ™‚

    #757636
    Jose

    Did #1 – didnt work…

    #757638
    Leo
    Staff
    Customer Support

    How are you adding FA? Using this method?
    https://docs.generatepress.com/article/font-awesome/

    #757650
    Jose

    No… I thought it was inbuilt. Strange that its showing on other pages, may be pulling from our cdn cache previously.

    So what you’re saying is that by adding the following to an Element Header, we can incorporate it?

    add_action( ‘wp_enqueue_scripts’, ‘tu_load_font_awesome’ );
    /**
    * Enqueue Font Awesome.
    */
    function tu_load_font_awesome() {
    wp_enqueue_style( ‘font-awesome’, ‘//use.fontawesome.com/releases/v5.5.0/css/all.css’, array(), ‘5.5.0’ );
    }

    #757654
    Jose

    Just added the code via Code Snippet plugin, but seems like a box is appearing now…

    #757665
    Tom
    Lead Developer
    Lead Developer

    That adds Font Awesome 5, so you need to use the Font Awesome 5 class: https://fontawesome.com/icons/twitter?style=brands

    <i class="fab fa-twitter"></i>

    #757684
    Jose

    Ah ok! Got it… forgot about changing the code for the new font awesome. Thanks Tom!

    And btw, I’m really finding GeneratePress amazing… your attention to detail is unbelievable. Case in point, on the menu drop down usage, whether to use click/hover… I have never seen so much thought gone into a product!

    #757712
    Tom
    Lead Developer
    Lead Developer

    Thank you! Really appreciate it ๐Ÿ™‚

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.