{"id":3862,"date":"2020-05-26T06:43:07","date_gmt":"2020-05-26T06:43:07","guid":{"rendered":"https:\/\/demos.welaunch.io\/helpdesk\/?post_type=faq&#038;p=3862"},"modified":"2020-05-26T06:43:07","modified_gmt":"2020-05-26T06:43:07","slug":"can-i-disable-faq-comments","status":"publish","type":"faq","link":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/docs\/faq\/can-i-disable-faq-comments\/","title":{"rendered":"Can I disable FAQ comments"},"content":{"rendered":"[vc_row][vc_column width=&#8221;1\/2&#8243;][vc_column_text]To disable comments in general, go to your wp-admin panel. Then open Settings &gt; Discussions. There you can disable &#8220;allow people to submit comments on new posts&#8221;.<\/p>\n<p>If you only want to disable comments for certain FAQs, then open a post and see discussions box. There you can uncheck &#8220;Allow Comments&#8221;.[\/vc_column_text][\/vc_column][vc_column width=&#8221;1\/2&#8243;][vcex_image overlay_style=&#8221;&#8221; image_id=&#8221;3863&#8243; main_notice=&#8221;&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]You can also disable comments for all frequently asked question post types. Simply put the following code into your functions.php file.<\/p>\n<pre>function disable_comments_for_faq_post_types( $open, $post_id ) {\r\n    $post_type = get_post_type( $post_id );\r\n    \/\/ disable comments for built-in \"faq\" post type\r\n    if ( $post_type == 'faq' ) {\r\n        return false;\r\n    }\r\n    \/\/ enable comments for any other post types\r\n    return true;\r\n}\r\nadd_filter( 'comments_open', 'disable_comments_for_faq_post_types', 10 , 2 );\r\n<\/pre>\n[\/vc_column_text][\/vc_column][\/vc_row]\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-3862","faq","type-faq","status-publish","hentry","faq_topics-faq"],"acf":[],"_links":{"self":[{"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/faq\/3862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/comments?post=3862"}],"version-history":[{"count":1,"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/faq\/3862\/revisions"}],"predecessor-version":[{"id":3864,"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/faq\/3862\/revisions\/3864"}],"wp:attachment":[{"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/media?parent=3862"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/demos.welaunch.io\/wordpress-helpdesk\/wp-json\/wp\/v2\/product_cat?post=3862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}