Sterling Theme – JetPack Comments Plugin

By default, third party comment plugins such as disqus comments plugin, spam free wordpress, etc will not work with Sterling 2.1.1 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) Open up Sterling/framework/global/theme_functions.php go to line 21 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) Open up Sterling/framework/theme_specifc/admin-functions.php go to line 464 and 465 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) Open up Sterling/framework/theme_specifc/metabox.php go to line 355 find and remove the following block of codes. This will remove the theme added page comments checkbox in your add and edit pages admin view.

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

5) You will have to repeat the above steps if you upgrade your theme. Note – Line numbers may vary per Theme Version number. That’s all. Thanks!