Last active
December 16, 2015 10:09
-
-
Save braddalton/5418259 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
function wpsites_hide_comments_logged_out_users() { | |
if ( !is_user_logged_in() ) | |
remove_action( 'genesis_after_post', 'genesis_get_comments_template' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'wpsites_hide_comments_logged_out_users' ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* | |
* @link http://wpsites.net/web-design/hide-comments-logged-out-users/ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment