Dequeue all styles and scripts
-
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.jsgive-stripe.js
give-recurring.jsthen 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?
- The topic ‘Dequeue all styles and scripts’ is closed to new replies.