Skip to content
November 30, 2025
  • About
  • Beauty
  • Concerts
  • Pinoy Power
  • Health and Fitness
  • Travel
  • Arts and Culture

Starmometer

Your Total Entertainment Blog

Primary Menu
  • About
  • Beauty
  • Concerts
  • Pinoy Power
  • Health and Fitness
  • Travel
  • Arts and Culture
Watch
  • Home
  • Completely Disable Comments

Completely Disable Comments

July 20, 2022

add_action(\’admin_init\’, function () {
// Redirect any user trying to access comments page
global $pagenow;

if ($pagenow === \’edit-comments.php\’) {
wp_safe_redirect(admin_url());
exit;
}

// Remove comments metabox from dashboard
remove_meta_box(\’dashboard_recent_comments\’, \’dashboard\’, \’normal\’);

// Disable support for comments and trackbacks in post types
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\’);
}
}
});

// Close comments on the front-end
add_filter(\’comments_open\’, \’__return_false\’, 20, 2);
add_filter(\’pings_open\’, \’__return_false\’, 20, 2);

// Hide existing comments
add_filter(\’comments_array\’, \’__return_empty_array\’, 10, 2);

// Remove comments page in menu
add_action(\’admin_menu\’, function () {
remove_menu_page(\’edit-comments.php\’);
});

// Remove comments links from admin bar
add_action(\’init\’, function () {
if (is_admin_bar_showing()) {
remove_action(\’admin_bar_menu\’, \’wp_admin_bar_comments_menu\’, 60);
}
});

Post navigation

Previous: \’Magandang Buhay\’ Levels Up Momshie Bonding on New Timeslot
Next: Enjoy Rewards When You Pay Your Smart Postpaid and Smart Bro Bill Online

Recent Posts

  • Young Filipino Creatives Shine in OPPO and Cultural Center of the Philippines’ ‘OPPO Likha Creative Challenge’
  • Kim, Belle, James, and ‘What Lies Beneath’ Stars Level Up the Celebration on ‘ASAP’ This Sunday
  • A Magical Collaboration: KAIA’s Sophia, FINA’s Chill Bring ‘WICKED: For Good’ to Life
  • Jake Begins his Revenge Against Sue, Charlie, Janella, and Kaila in ‘What Lies Beneath’
  • Freddy and the Gang are Spreading Fear on a Whole New Level in ‘Five Nights at Freddy’s 2’
  • The All-American Rejects Reignite Their Signature Energy in Vibrant New Single ‘Get This’
  • MINH Unveils Debut EP ‘THANK GOD! IT DIDN’T WORK OUT’
  • Dey Say Announce their Original Holiday Project ‘Christmas Wish – The EP’
  • K-pop Stars Kim Myung Soo and Choi Bo Min Spotlight the Philippines as the Ultimate Warm-Weather Escape this Winter
  • EastWest, Foodpanda, and Visa Launch a Credit Card Built for Food Lovers
  • Julie Anne San Jose Embraces Creative Freedom with New Single ‘Simula’
  • Alden Richards Celebrates His 15th Showbiz Anniversary with Fan Meet ‘ARXV: Moving ForwARd’
  • Fast-rising Karate Club is Gaining Traction in Various Karatedo  Competitions
  • Gift Smart and Strong this Holiday Season with the OPPO A Series
  • MediaQuest and CreaZion Studios Drop the First Teaser for the PH Adaptation of ‘The Good Doctor’
  • Everyone’s Upgrading to This Electric Toothbrush – Have You?
  • PLDT Enterprise, Nabstract Partner to Combat OTP Fraud Through SmartSafe SilentAccess 
  • Inigo Pascual Leads ‘The Good Doctor’, the Official Philippine Adaptation Arriving in 2026
  • Aurora Music Fest Draws Record-Breaking Crowd in Cebu
  • Korean Crime Action Drama ‘Villains’ to Premiere on HBO Max on December 18
  • Eye Mo Launches ‘Eye Mo Cool: The Philippines’ First Cooling Eye Drop for Red Eyes
  • It’s Giving: Why Samsung’s Galaxy A Series Makes the Perfect Holiday Gift
  • New Trailer for Sony Pictures Animation’s ‘GOAT’ Out Now!
  • Mamoru Hosoda’s Time-Bending Anime ‘Scarlet’ Premieres at the Venice Film Festival to a 10-minute Standing Ovation
  • South Palms Resort & Spa Panglao—MGallery Collection Chooses Alcatel-Lucent Enterprise to Deliver Enhanced Guest Experience

Archives

Categories

  • Young Filipino Creatives Shine in OPPO and Cultural Center of the Philippines’ ‘OPPO Likha Creative Challenge’
  • Kim, Belle, James, and ‘What Lies Beneath’ Stars Level Up the Celebration on ‘ASAP’ This Sunday
  • A Magical Collaboration: KAIA’s Sophia, FINA’s Chill Bring ‘WICKED: For Good’ to Life
  • Jake Begins his Revenge Against Sue, Charlie, Janella, and Kaila in ‘What Lies Beneath’
  • Freddy and the Gang are Spreading Fear on a Whole New Level in ‘Five Nights at Freddy’s 2’
Copyright © All rights reserved. | MoreNews by AF themes.