Last active
July 13, 2018 16:18
-
-
Save cinghaman/f164487cd41d0f5840c2ba2b4c8684c3 to your computer and use it in GitHub Desktop.
Remove dashicons script for non logged in users - WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add it in the end of your functions.php file in the child theme | |
// Remove dashicons in frontend for unauthenticated users | |
add_action( 'wp_enqueue_scripts', 'rs_dequeue_dashicons' ); | |
function rs_dequeue_dashicons() { | |
if ( ! is_user_logged_in() ) { | |
wp_deregister_style( 'dashicons' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment