• Resolved Egl

    (@egletiere)


    Hi!

    We noticed in our website’s source that the plugins’ css in right at the begining of head.

    Is there any way to move this lower?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @egletiere

    I am sorry, we don’t have an option to do that, we output our styles on the wp_head:

    add_action('wp_head', 'NextendSocialLogin::styles', 100);

    If you would like to modify the position of the styles, then the options you have:

    A.) use an optimizer plugin, as some of them gives you an option to combine inline styles and load them at another position

    B.) remove our styles via remove_action and hook it to another action which gets fired only once, e.g.:

    add_action('init', function(){
    remove_action('wp_head', 'NextendSocialLogin::styles', 100);
    add_action('wp_footer', 'NextendSocialLogin::styles', 100);
    });

    However please note that:

    • this will broke our code intended to remove the social buttons from the AMP requests, as our code expects the styles to be hooked to the wp_head, action. This means, our styles will be added to the page even in the AMP request. So if you use AMP, then you will need to unhook your hooked code manually. If you search for the isAMPRequest in our source code, you will see how we check if the request is an AMP request.
    • we can not provide support for custom coding or problems caused by custom codes. E.g. if your theme won’t fire the wp_footer action for some reason, then the styles will go missing and the social buttons will look broken. If that happens, then you will need to find an alternative action that suits your needs.

    Best regards,
    Laszlo.

    Thread Starter Egl

    (@egletiere)

    Thanks for the quick reply!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change priority’ is closed to new replies.