Title: Disabling Comments in Docs
Last modified: August 30, 2016

---

# Disabling Comments in Docs

 *  [jjkob](https://wordpress.org/support/users/jjkob/)
 * (@jjkob)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/)
 * I have disabled Comments in my Doc by unchecking “Allow comments” on the Edit
   Doc page, however my [Doc page](http://demos.timersys.com/webjd/docs/patents-legal-guide/)
   nevertheless allows users to post comments. Please let me know what additional
   or alternative steps I must take to disable comments on Doc pages.
 * [https://wordpress.org/plugins/buddypress-docs/](https://wordpress.org/plugins/buddypress-docs/)

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

 *  [Georgio](https://wordpress.org/support/users/georgio-1/)
 * (@georgio-1)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/#post-6575904)
 * Same problem here…
 *  [Chris Barrett](https://wordpress.org/support/users/cbarrett123/)
 * (@cbarrett123)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/#post-6575924)
 * My approach was to use this plugin: [https://wordpress.org/plugins/disable-comments/](https://wordpress.org/plugins/disable-comments/)
 * Then, I added to my Child theme the following CSS statements to suppress the 
   meta details:
 *     ```
       #doc-permissions-details .bp-docs-can-read_comments,
       #doc-permissions-details .bp-docs-can-post_comments,
       .bp-docs-access-row.bp-docs-access-row-read_comments,
       .bp-docs-access-row.bp-docs-access-row-post_comments  {
         display: none;
       }
       ```
   
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/#post-6575928)
 * Hi all-
 * Comments are allowed on a per-doc basis, via the access setting `post comments`.
   The most restrictive setting is “the Doc author only.” Please be sure that you’re
   logged out (or logged in as a different user) to check whether the comments section
   is actually showing up on your doc inappropriately.
 * If the comments section is still showing up on that doc, leave a test comment
   on that doc’s read page, then log in as your site admin user and, via wp-admin,
   see which post that comment is being applied to. (Is it the doc you were viewing,
   or some other post/page?)
 * If the comments section is still being forced to display, it may be something
   in your theme. It would be really helpful if you could install the excellent 
   plugin “Query Monitor” and load that doc’s read page. What `Template` does QM
   think is being used to display that doc? (Mine uses `buddypress.php` for example.)
   Please report back which template is being used, and which theme you’re using.
 * Thanks for your troubleshooting help!
 * -David
 *  [Chris Barrett](https://wordpress.org/support/users/cbarrett123/)
 * (@cbarrett123)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/#post-6575931)
 * Hi,
 * I don’t even want the Doc author to have comment ability. I feel there should
   be a global setting to disable – just like there is for attachments. Unfortunately,
   adding the following to my child theme didn’t work (but, the plugin I referenced
   did):
 *     ```
       add_action( 'init', 'remove_buddy_docs_comment' );
       function remove_buddy_docs_comment() {
           remove_post_type_support( 'bp_doc', 'comments' );
       }
       ```
   
 * To answer your question, we are using the Twenty Fourteen theme. I created a 
   test post, set Comments to “the Doc author only”, then signed back in as a different
   user. The post displayed the warning “Comment display has been disabled on this
   doc.”, but the comment box was still presented immediately below the warning.
   The comment appeared on that post. Signing back in as the author, checked the
   dashboard and the comment was associated with the post there also.
 * Regarding QM, it reports the template as
    `/wp-content/themes/twentyfourteen/
   page.php`
 * I also tried the Twenty Fifteen theme. Same behaviour – except QM reported
    `/
   wp-content/themes/twentyfifteen/page.php` of course. 🙂
 *  Plugin Author [Boone Gorges](https://wordpress.org/support/users/boonebgorges/)
 * (@boonebgorges)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/#post-6575933)
 * This is probably related to other comment-related issues: in some themes, the
   comment area on Docs is controlled by buddypress-docs, while in others, the theme’s
   native commenting area appears.
 * A global solution, until this is sorted out in Docs, would be something like 
   this:
 *     ```
       function bbg_disable_all_bp_docs_comments( $open, $post_id ) {
           $post = get_post( $post_id );
           if ( $post && bp_docs_get_post_type_name() == $post->post_type ) {
               $open = false;
           }
   
           return $open;
       }
       add_filter( 'comments_open', 'bbg_disable_all_bp_docs_comments', 100, 2 );
       ```
   

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

The topic ‘Disabling Comments in Docs’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-docs.svg)
 * [BuddyPress Docs](https://wordpress.org/plugins/buddypress-docs/)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-docs/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-docs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-docs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-docs/reviews/)

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * 5 replies
 * 5 participants
 * Last reply from: [Boone Gorges](https://wordpress.org/support/users/boonebgorges/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/disabling-comments-in-docs/#post-6575933)
 * Status: not resolved