• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

Wordpress - Hide Comments

On a Wordpress site that I'm creating, I would like visitors to have the ability to submit comments for individual articles but don't want the comments to be visible on the page (so they would only be viewable once logged in to the admin).

Does anyone know how this can be done? It seems like a relatively simple request but I can't seem to find a solution for it. Thanks.
1 Solution
If you set your comments to be moderated then they will only appear  after you / an admin approves them.

Did I understand your question properly?
Aaron TomoskyTechnology ConsultantCommented:
Just set comments need approval. That way nothing shows up on the page but admins can view all from the control panel
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

if you want the following:
-. everybody (general visitors, registered visitors, admins) can post comments (AND)
-. comments cannot be seen by non-admins (AND)
-. comments are only available for admins (AND)

then you can do the following:
-. edit page.php, single.php (and or other pages in your active theme)
-. look for where the comments are being displayed. Mostly using this function:
<?php wp_list_comments('reply_text=&nbsp;'); ?>

Open in new window

-. put the following line:
<?php if ( current_user_can('manage_options') )
	<?php wp_list_comments('reply_text=&nbsp;'); ?>
     } else  {

Open in new window

Good luck, and please do correct me if I'm wrong :-)
AdamAuthor Commented:
Thanks for the replies everyone - they were greatly appreciated.

But special thanks to meb_santoso as I think his solution worked best for what I was looking for.
good that it works out for you :-) and thanks for the points

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now