• Resolved mojamba

    (@mojamba)


    I am trying to optimize my site speed and I want to move the pricing table styles into my child theme stylesheet. To do that I also need to dequeue dh-ptp-design1 but somehow I am unable to accomplish this. I have tried different priorities and different action hooks but no luck. Any ideas?

    https://wordpress.org/plugins/easy-pricing-tables/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mojamba

    (@mojamba)

    For anyone interested, I worked it out. I was trying to dequeue too early. It needs to be done in a footer or later action hook. Here’s what I finally used:

    function remove_assets_footer_scripts() {
    	// --- dequeue Easy Pricing Tables stylesheet
    	wp_dequeue_style( 'dh-ptp-design1' );
    	wp_deregister_style( 'dh-ptp-design1' );
    }
    add_action( 'wp_print_footer_scripts', 'remove_assets_footer_scripts', 0 );

    Thank you! Would be great for this to get added to the docs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘dequeue CSS stylesheet’ is closed to new replies.