Solved

Wordpress - Hide Comments

Posted on 2011-03-15
6
425 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:Adam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 6

Expert Comment

by:akajohn
ID: 35137677
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?
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 35137682
Just set comments need approval. That way nothing shows up on the page but admins can view all from the control panel
0
 
LVL 6

Expert Comment

by:akajohn
ID: 35137699
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 5

Accepted Solution

by:
meb_santoso earned 500 total points
ID: 35137758
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  {
          print("");
     }
?>

Open in new window


Good luck, and please do correct me if I'm wrong :-)
0
 
LVL 1

Author Closing Comment

by:Adam
ID: 35138735
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.
0
 
LVL 5

Expert Comment

by:meb_santoso
ID: 35138872
good that it works out for you :-) and thanks for the points
0

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime is disastrous for companies and can lead to major hits on a brand, reputation, an…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question