New Landing How can we help? Themeforest Theme Support Uplift How to avoid duplicate 2 Font Awesome requests inc CSS

Viewing 14 posts - 1 through 14 (of 14 total)
  • Posted in: Uplift
  • #289362
    mhote
    Member
    Post count: 394

    Hi,

    Trying to reduce http requests. We are getting 4 (2 x 2) requests for font awesome.

    Adding 90kb to homepage and 2 extra calls.

    From both the theme and our form plugin, planso. see:

    https://tools.pingdom.com/#!/exlYI8/hoteliyo.com/?burstcache

    The plugin author has said:

    – – –
    We are loading all the external links ( Including Font-awsome ) using wordpress standard method (Using enqueue function). This wordpress function will not load the scripts or styles if they are already loaded in the same way (WordPress standard way using enqueue function) in your site. If your theme is also doing it in the same way then there will not be any extra http requests by planso forms.
    – – –

    How can we ensure this js and css file are only loaded once?

    #289370
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    functions sf_removeAwesome(){
    wp_deregister_style('fontawesome');
    wp_dequeue_style('fontawesome');
    }
    
    add_action('init','sf_removeAwesome');
    

    Thanks
    Mohammad

    #289382
    mhote
    Member
    Post count: 394

    Hi Mohammad – that breaks out site (white screen)

    #289384
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me login detail after installing WPIDE plugin.
    Thanks
    Mohammad

    #289387
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #289410
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Where is wpide editor page to edit the theme?
    Thanks
    Mohammad

    #289414
    mhote
    Member
    Post count: 394

    Not sure Mohammad. But plugin is installed.

    #289417
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You customized the admin menu so i am not able to find.
    Thanks
    Mohammad

    #289421
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #289427
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me FTP login detail to edit the theme files.
    Thanks
    Mohammad

    #289428
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #289439
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have managed to resolve the issue so please check it now.
    Thanks
    Mohammad

    #289495
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #289518
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @mhote

    We will adjust our font-awesome stylesheet id to match for the next update. You can do that now by editing uplift/functions.php line 256:

    wp_register_style('font-awesome', SF_LOCAL_PATH .'/css/font-awesome.min.css', array(), NULL, 'all');
    

    That should sort it.

    – Ed

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register