Only load CSS on relevant page
-
Hello,
it seems your css file is loaded on every single page, even when it’s only needed on checkout. Could you change this; or could you give me the style to deque?
I am talking about: /plugins/mollie-payments-for-woocommerce/public/css/mollie-gateway-icons.min.css
I would like to dequeue it as follows. Could you provide me with the correct style?
add_action('wp_enqueue_scripts', 'disable_woocommerce_loading_css_js' ); function disable_woocommerce_loading_css_js() { if(! is_cart() && ! is_checkout() ) { wp_dequeue_style('<strong>MOLLIE??</strong>'); } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Only load CSS on relevant page’ is closed to new replies.