Title: Remove comments tab from
Last modified: August 18, 2016

---

# Remove comments tab from

 *  [maduser](https://wordpress.org/support/users/maduser/)
 * (@maduser)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/)
 * hi guys,
 * Is there a way to remove comments tab in the admin menu for all my non-admin 
   users?
 * I tried using role-manager plugin in which I turned off ‘Moderate Comments’, 
   but cannot get rid of the comments tab.
 * Cheers
 * maddy

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571133)
 * The ‘edit_posts’ capability is required for that menu to display, but if you 
   want users to edit posts, then you might want to change wp-admin/menu.php.
 * Of course, if you change a core file like that, make a backup before changing,
   and remember you might need to fix that again for future releases.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571149)
 * Adding link to trac ticket for information:
    [http://trac.wordpress.org/ticket/4353](http://trac.wordpress.org/ticket/4353)
 *  [cam_oai](https://wordpress.org/support/users/cam_oai/)
 * (@cam_oai)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571496)
 * there is a way, but not sure you like it or not:
    in wp-admin/edit-comments.php,
   at the first line, put this code:
 *     ```
       <?php
       	if ($user_level < 9){
       	echo "Restricted area";
       	exit;
       }
       ```
   
 * this will block users below level 9 (admin is 10).
 * Cheers
 *  [cavendash](https://wordpress.org/support/users/cavendash/)
 * (@cavendash)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571500)
 * I tried this, and it blocks everyone–including admins–from being able to access
   the comments section. Any ideas? I’m using WP 2.2.
 *  [cam_oai](https://wordpress.org/support/users/cam_oai/)
 * (@cam_oai)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571501)
 * you are right, sorry. this one works and the same code should place BELOW require_once(‘
   admin.php’) the code :
 * you can try it at my website if needed
 *     ```
       <?php
   
       require_once('admin.php');
   
       	if ($user_level < 9){
       	echo "Restricted area";
       	exit;
       }
       ```
   
 * ————-
    edit: if you want to keep the header and footer, then you should move 
   the code BELOW: require_once(‘admin-header.php’); then add this code (almost 
   same):
 *     ```
       *******************
       //HACK FOR VIETZON
       	if ($user_level < 9){
       	echo "<div style='text-align:center;color:red; padding-top:100px';><h1>Restricted area</h1></div>";
       	include('admin-footer.php');
       	exit;
       }
       //HACK ENDS
       ```
   
 * remove div if you want to.
 * cheers
 *  [dejadone](https://wordpress.org/support/users/dejadone/)
 * (@dejadone)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571530)
 * The little code works fine -Thanks- but except if the user clicks on Manage/ 
   Posts and then clicks on the number showing how many comments there are; we have
   exactly the same problem!! Coming to comments page through edit.php is not avoided
   like this..
 * Actually I would prefer the users to see and search the comments but not see 
   the IPs and emails of the others. Any suggestion is very much appreciated..
 * Thanks..
 *  [htan](https://wordpress.org/support/users/htan/)
 * (@htan)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571533)
 * My workaround
    Change edit.php line `<a href="http://ws.arin.net/cgi-bin/whois.
   pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a>`
 * With this one.
    `<a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php
   comment_author_url() ?>"><?php comment_author_url_link() ?></a>`

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Remove comments tab from’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 6 participants
 * Last reply from: [htan](https://wordpress.org/support/users/htan/)
 * Last activity: [18 years, 8 months ago](https://wordpress.org/support/topic/remove-comments-tab-from/#post-571533)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
