Skip to content

Instantly share code, notes, and snippets.

@allysonsouza
Created October 14, 2014 17:52
Show Gist options
  • Save allysonsouza/bb1d8c75087ba6d539c4 to your computer and use it in GitHub Desktop.
Save allysonsouza/bb1d8c75087ba6d539c4 to your computer and use it in GitHub Desktop.
Remove enqueued theme style in WordPress
<?php
global $wp_styles;
$num = count($wp_styles->queue);
for( $i = 0; $i < $num; $i++){
if( $wp_styles->queue[$i] != 'admin-bar' ){
unset($wp_styles->queue[$i]);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment