
// --- Disable Comments Completely ---
add_action('admin_init', function () {
    global $pagenow;
    if ($pagenow === 'edit-comments.php') {
        wp_redirect(admin_url());
        exit;
    }
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
    foreach (get_post_types() as $post_type) {
        if (post_type_supports($post_type, 'comments')) {
            remove_post_type_support($post_type, 'comments');
            remove_post_type_support($post_type, 'trackbacks');
        }
    }
});
add_filter('comments_open', '__return_false', 20, 2);
add_filter('pings_open', '__return_false', 20, 2);
add_filter('comments_array', '__return_empty_array', 10, 2);
add_action('admin_menu', function () {
    remove_menu_page('edit-comments.php');
});
add_action('init', function () {
    if (is_admin_bar_showing()) {
        remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    }
});
// -----------------------------------


// --- Hide Comments via CSS ---
add_action('wp_head', function() {
    echo '<style>
        #comments, #respond, .comment-respond, .comment-area, .comments-area, .comment-title { display: none !important; }
    </style>';
});
// -----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://trend-service7.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://trend-service7.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://trend-service7.com/wp-sitemap-posts-post-2.xml</loc></sitemap><sitemap><loc>https://trend-service7.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://trend-service7.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap></sitemapindex>
