• Resolved dev

    (@devksec)


    Hello,

    wordpress dequeue and deregister styles won’t apply for the front-end CSS files, where there’s no issue with other plugins/wordpress style sheets being removed.

    Is there a reason why “ivole-frontend-css-css” can’t be removed on non-product pages, even with a 999 priority?

    function dequeue_components_style_on_product_category_and_homepage() {
    // Check if it’s a product category page, the homepage, or the front page
    if (is_product_category() || is_home() || is_front_page()) {
    wp_dequeue_style(‘ivole-frontend-css-css’);
    wp_deregister_style(‘ivole-frontend-css-css’);
    }
    }

    // Hook the function to the wp_print_styles action with a high priority
    add_action(‘wp_print_styles’, ‘dequeue_components_style_on_product_category_and_homepage’, 999);

Viewing 1 replies (of 1 total)
  • Thread Starter dev

    (@devksec)

    Despite the ID being ‘ivole-frontend-css-css’ in the page HTML, its actually ‘ivole-frontend-css” that needs to be dequeued.

Viewing 1 replies (of 1 total)

The topic ‘D’ is closed to new replies.