Created
March 11, 2015 12:35
-
-
Save matheuscl/403608c28e8650065b5a to your computer and use it in GitHub Desktop.
THis gist is for this stack question: http://wordpress.stackexchange.com/questions/180782/theme-style-different-when-user-not-logged-in
This file contains 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
<?php | |
function theme_name_scripts() { | |
if( is_user_logged_in() ){ | |
wp_enqueue_style( 'style-logged-in', get_stylesheet_uri(). '/css/logged-in.min.css', array(), '1.0.0' ); | |
}else{ | |
wp_enqueue_style( 'style-logged-out', get_stylesheet_uri(). '/css/logged-out.min.css', array(), '1.0.0' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment