Skip to content
November 23, 2026
  • 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

Completely Disable Comments

July 20, 2022 1 minute read

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: Display a message after the 1st paragraph of posts
Next: Enjoy Rewards When You Pay Your Smart Postpaid and Smart Bro Bill Online

Recent Posts

  • Visiting Singapore this Holiday Season? Don’t Miss this Singapore-Exclusive Pompompurin + Starbucks® Collection
  • Purple Hearts Unveils Upgraded Packaging and Welcomes the Velasquez Family as Newest Endorsers
  • ATARASHII GAKKO! Glastonbury 2027 Debut – Japanese Female Group Makes History with Back-to-Back Festival Landmarks
  • The Dawn Belongs to STARGLOW: ‘Aurora’ is How Their First Year Sounds
  • Filipino Singer-Songwriter Denice Lao Drops ‘The Nice Girl,’ the First Single of Her Upcoming Debut Album of the Same Title
  • Indie-Pop Artist Rosie Darling Explores Love and Loneliness in New Single ‘Dinner Party’
  • yaeow Releases ‘The Aftertaste’ – Four-Track EP Reflects on the Journeys That Shape Us
  • Pickleball PH Opens First-Ever Physical Store at Greenhills
  • From Daily Routines to Dating Conversations: usmile Makes Oral Care Relatable
  • Your Netflix December Watchlist is the Gift That Keeps on Giving!
  • Nameless Kids to Perform at Bangkok Music City 2027
  • Nadine Lustre Turns to Late-Night Escapism in Introspective New Single ‘WYD’
  • Creators Bring their Own Christmas Vibe with Vivo V80
  • Explore Creative Possibilities with OPPO A7 Pro 5G Camera Innovations
  • British Girl Group Say Now, Featuring Filipina Member Ysabelle, Enters A New Era with Debut EP ‘SAY WHAT YOU SEE’
  • Leon Explores Many Colors of Love in Self-Titled Debut EP
  • Filipino Singer-Songwriter Leanne Celebrates the Magic of an Unfolding Romance in ‘Pakiusap Ko’
  • 3 Signs the Paskong Pinoy Season is Here
  • Crunchyroll Returns to AFA Singapore 2026 with Immersive Anime Worlds and Partnership with Make-A Wish
  • Celebrate A Very Extra Christmas at Ayala Malls
  • LEON BLANE Releases ‘Little Hopeful Song’ – A Feel-Good Synth-Pop Anthem for Divided Times
  • Lisa Kicks Off Sold Out Las Vegas Residency VIVA LA LISA
  • What to Look Forward to Before Livestreaming the 2026 MAMA AWARDS on HBO Max
  • Crunchyroll Launches Black Friday Sale with Six Months of Discounted Membership
  • DZMM Teleradyo Now Available on Cignal, SatLite Channel 32

Archives

Categories

  • Visiting Singapore this Holiday Season? Don’t Miss this Singapore-Exclusive Pompompurin + Starbucks® Collection
  • Purple Hearts Unveils Upgraded Packaging and Welcomes the Velasquez Family as Newest Endorsers
  • ATARASHII GAKKO! Glastonbury 2027 Debut – Japanese Female Group Makes History with Back-to-Back Festival Landmarks
  • The Dawn Belongs to STARGLOW: ‘Aurora’ is How Their First Year Sounds
  • Filipino Singer-Songwriter Denice Lao Drops ‘The Nice Girl,’ the First Single of Her Upcoming Debut Album of the Same Title
Copyright © All rights reserved. | MoreNews by AF themes.