Revert Page Comments to WordPress default in Karma (So that it works with Comment plugins)

By default, third party comment plugins such as DisQus comments Plugin, Spam free WordPress Plugin, Social Plugin, etc will not work with Karma. This is because we have a modified comments system for pages, not the default WordPress comments for pages. Please follow the steps below to revert our theme to WordPress default comments system for pages. No changes needed for blog post comments. 1) Open up comments.php and copy the whole content in this file. Open up page-comments.php and replace all content in this file with that of comments.php The contents of page-comments.php must be the same with comments.php 2) For Karma versions below 4.0 – Open up Karma/truethemes_framework/global/theme_functions.php go to line 22 and remove the following codes. For Karma 4.0 Open up Karma/framework/theme_functions.php go to line 22 and remove the following codes. This will prevent the weird behavior of disqus comments box showing up even if you disable comments.

 add_action('template_redirect', 'tt_get_comments_status'); 

3) For Karma versions below 4.0 – Open up Karma/truethemes_framework/theme_specifc/admin-functions.php go to line 538 and 539 (in some versions line may be 532 and 533) and remove the following codes. For Karma 4.0 – Open up Karma/framework/site-options-functions.php go to line 963 and 964 and remove the following codes. This will enable your discussion metabox to appear in add or edit page view in WordPress admin. Now you can unchecked the comments and trackbacks in Discussion metabox to disable disqus comments in pages.

 remove_meta_box('commentstatusdiv','page','normal'); // Comments remove_meta_box('commentsdiv','page','normal'); // Comments 

4) For Karma versions below 4.0 – Open up Karma/truethemes_framework/theme_specifc/metabox.php go to line 325 find and remove the following block of codes.

 array(     'name' => __('Page Comments','framework_localize'),     'desc' => __('Check this box to enable comments on this page.','framework_localize'),     'id' => $prefix . 'page_comments',     'type' => 'checkbox' ), 

For Karma 4.0 – Open up Karma/framework/custom-metaboxes.php go to line 221 find and remove the following block of codes. (221 to 230) This will remove the theme added page comments checkbox in your add and edit pages admin view.

 array( 	'name'    => __('Page Comments','truethemes_localize'), 	'desc'    => __('Should a Comments Form be displayed at the bottom of this page?','truethemes_localize'), 	'id'      => 'page_comments', 	'type'    => 'select', 	'options' => array( 		array('name' => 'No', 'value'  => ''), 		array('name' => 'Yes', 'value' => 'on'), 	) ), 

5) You will have to repeat the above steps if you upgrade your theme. That’s all. Thanks!