Last active
May 22, 2020 07:58
-
-
Save aslamahamed13/200af837ae43fc4dd330ac3f93a8b99e to your computer and use it in GitHub Desktop.
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
add_filter('body_class','er_logged_in_filter'); | |
function er_logged_in_filter($classes) { | |
if( is_user_logged_in() ) { | |
$classes[] = 'loggedin-class'; | |
} else { | |
$classes[] = 'loggedout-class'; | |
} | |
return $classes; | |
} |
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
.loggedout-class.post-284267 .entry-content { | |
padding: 0.75rem 1.25rem; | |
border: 1px solid transparent; | |
border-radius: 0.25rem; | |
color: #004085; | |
background-color: #cce5ff; | |
border-color: #b8daff; | |
} | |
.loggedout-class.page-id-288728 .entry-content { | |
padding: 0.75rem 1.25rem; | |
border: 1px solid transparent; | |
border-radius: 0.25rem; | |
color: #004085; | |
background-color: #cce5ff; | |
border-color: #b8daff; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment