Remove comments completely from settings
-
For every website we create we never use comments so we just disable them in settings. But I noticed that queries for them are still generated on each page in backend, for example in all posts list there are 2 queries triggered each time
SELECT comment_approved, COUNT( * ) AS total FROM wp_comments GROUP BY comment_approved SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM wp_comments WHERE comment_post_ID IN ( XXX ) AND comment_approved = '0' GROUP BY comment_post_IDIt would be nice to optimize that a bit.
This removes the page Comment from admin menu but queries are still generated
function df_disable_comments_admin_menu() {
remove_menu_page(‘edit-comments.php’);
}
add_action(‘admin_menu’, ‘df_disable_comments_admin_menu’);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Remove comments completely from settings’ is closed to new replies.