• Resolved vergedesign

    (@vergedesign)


    Hi, so i read the tutorial on how to conditionally load scripts and styles…. I dont want to load them on specific pages. All i want to do is remove every single style and script relating to the give plugin and addon plugi from the home page…

    The code i added is:

    if (is_front_page() ) {
    wp_dequeue_script(‘give’);
    wp_dequeue_style(‘give-styles’);
    }

    Now, this only removes the give core script and stylesheet….

    However, there are still many many more styles being loaded.

    For example. wp give stripe loads almost 15 requests itself… For this to load on the home page is not needed at ALL, as I don’t have any forms on the home page.

    More requests are coming from:

    give-gift-aid-frontend.min.css
    give-recurring.css
    gift-fee-recovery-public-min.js
    give-gift-aid-public.min.js

    give-stripe.js
    give-recurring.js

    then of course stripes 5 or 6 additional files, a few images for giftaid plugin and more..

    Do you have a method of completely removing give and its plugins completely from the home page?

Viewing 1 replies (of 1 total)
  • Plugin Author Devin Walker

    (@dlocc)

    Hey @vergedesign – you can dequeue them like you are above with the core scripts. The names of the scripts differ from give-stripe to give-gift-aid but you can figure them out with a plugin. As well, in a future version of Give we’ll be conditionally enqueueing all the scripts.

Viewing 1 replies (of 1 total)
  • The topic ‘Dequeue all styles and scripts’ is closed to new replies.