How To Hide Comments From Logged Out Users

If for some reason you want to hide all your comments and the comments form from logged out users, you can.

Simply add this code to the end of your child themes functions.php file and it will stop the comments template from loading.

You could change the hooks if using a theme other than Genesis.

Another option would be to hide the comments but keep the comments form visible for logged out users.

You could even echo some text and HTML with a link to the login or registration page to your site.

Another option is to only display a login to comment link and NOT display a logout link which is already included above the comment form anyway.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.