Skip to content

Instantly share code, notes, and snippets.

@kevinwhoffman
Last active October 6, 2015 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinwhoffman/1b5dd890417e90f34e2e to your computer and use it in GitHub Desktop.
Save kevinwhoffman/1b5dd890417e90f34e2e to your computer and use it in GitHub Desktop.
Dequeue Styles
<?php
// Code used by plugin to enqueue styles
wp_enqueue_style('wpProQuiz_front_style', plugins_url('css/wpProQuiz_front'.(WPPROQUIZ_DEV ? '' : '.min').'.css', WPPROQUIZ_FILE), array(), WPPROQUIZ_VERSION );
wp_enqueue_style( 'sfwd_front_css', plugins_url( 'assets/css/front.css', dirname( __FILE__ ) ) );
wp_enqueue_style( 'sfwd_template_css', get_stylesheet_directory_uri().'/learndash/learndash_template_style.css' );
// My attempt at dequeuing styles
add_action( 'wp_print_styles', 'vms_dequeue_styles', 100 );
function vms_dequeue_styles() {
wp_dequeue_style( 'wpProQuiz_front_style' ); // works
wp_dequeue_style( 'sfwd_front_css' ); // not working
wp_dequeue_style( 'sfwd_template_css' ); // not working
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment