• Resolved aamir2007

    (@aamir2007)


    Hello,

    Thanks for the amazing plugin. I see it is loading inline css and js on all pages. However I would like to restrict it to login or register pages only. Please advice if there is any option/hook or filter to achieve this. Actually I don’t want to keep the pages as light as possible. Even this appears after we have successfully login to site that is un-necessary.

    Regards,

    Aamir

    The page I need help with: [log in to see the link]

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

    (@nextend_ramona)

    Hi @aamir2007

    Yes, we’re loading our CSS and JS codes on all pages because the login buttons can also be published by simple HTML. If any button is published with HTML, then we don’t have any way of knowing which page contains our login buttons from the PHP side, that is why the codes appear everywhere.

    That being said, you can exclude our scripts and styles by doing a condition check via PHP. Please note that, we can not provide support for custom coding, but here is an example that shows how you can do that:

    $pageID = get_the_ID(); 
    if ($pageID !== 61) {
        remove_action('wp_head', 'NextendSocialLogin::styles', 100);
        remove_action('wp_print_scripts', 'NextendSocialLogin::nslDOMReady');
        remove_action('wp_print_footer_scripts', 'NextendSocialLogin::scripts', 100);
    }

    i think this options should be a basic feature. Specially who wants to show in login/register/pass reset page only.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove inline js and css from non login pages.’ is closed to new replies.