In this article, we’ll see solution for How To Hide Comments in WordPress Page.
Table of Contents
WordPress, with its robust features and flexible architecture, allows website owners to customize their pages to suit their unique needs.
While comments provide valuable engagement and interaction, there may be instances where you prefer to hide comments on specific pages to streamline the user experience.
We will explore how to hide comments in WordPress pages effortlessly, empowering you to curate a seamless and distraction-free environment for your readers.
What Are Comments in WordPress?
In WordPress, comments allow visitors to interact with your content by sharing thoughts, asking questions, or engaging in discussions.
They are especially useful for:
- Blog posts
- Tutorials
- Community-driven websites
However, not every page needs them.
Comments are as much a part of a blog as the article itself. Your comment section engages readers and allows them to interact with other people who have similar interests.
Clients can make inquiries, make talk, and even make jokes or offer pictures relying upon how amazing the remark framework is.
You’ll even discover a few frameworks that give social sharing apparatuses or incorporated networks so you can achieve more guests.
Everything relies upon what sort of interface you’d like and which of the best WordPress remark frameworks you choose.
The Comments on specific posts and pages can help you engage the visitors more time on your website. It also allows your visitors to interact with other people who have the same interest.
The Comments sections can have more information than the actual article. People use the comment feature to solve temporary issues; it also helps you share details and ideas.
People can even use this feature for fun making things; they share jokes and funny images in the comment. But it depends on the comment system’s capability; we need a powerful comment system to share media files in the comment section.
Why Hide Comments in WordPress Pages?
While comments can be a valuable aspect of community engagement, there are situations where it might be beneficial to disable them on specific pages:
- Static Pages: WordPress pages like “About Us,” “Contact,” or “Terms and Conditions” typically contain static content where comments may not be necessary. Hiding comments on such pages keeps the focus on the primary content and avoids distractions.
- Landing Pages: Landing pages often serve specific purposes like lead generation, event registrations, or product promotions. In these cases, eliminating comments allows visitors to focus solely on the intended call-to-action, improving conversion rates.
- Portfolio or Showcase Pages: If you’re using WordPress to showcase your portfolio or a gallery of your work, hiding comments prevents them from overshadowing or cluttering the visual appeal of your creations.
Methods to Hide Comments in WordPress Pages:
Here are different way to hide comments in WordPress pages:
1). Using Quick Edit On Post:
Go to WordPress pages – Click “Quick edit”, you will see the option to give tick mark for comments, you can avoid that tick mark.
yourdomainname.com /wp-admin/edit.php?post_type=page
Then
Click quick edit of each page.
2). Using Page.php
The simplest way is to find out the following line in theme/page.php and delete or comment it.
<?php comments_template( '', true ); ?>
3). Using Functions.php
Add this code to your function.php file
// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ($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_action('admin_init', 'df_disable_comments_post_types_support');
// Close comments on the front-end
function df_disable_comments_status() {
return false;
}
add_filter('comments_open', 'df_disable_comments_status', 20, 2);
add_filter('pings_open', 'df_disable_comments_status', 20, 2);
// Hide existing comments
function df_disable_comments_hide_existing_comments($comments) {
$comments = array();
return $comments;
}
add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);
// Remove comments page in menu
function df_disable_comments_admin_menu() {
remove_menu_page('edit-comments.php');
}
add_action('admin_menu', 'df_disable_comments_admin_menu');
// Redirect any user trying to access comments page
function df_disable_comments_admin_menu_redirect() {
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
}
add_action('admin_init', 'df_disable_comments_admin_menu_redirect');
// Remove comments metabox from dashboard
function df_disable_comments_dashboard() {
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
}
add_action('admin_init', 'df_disable_comments_dashboard');
// Remove comments links from admin bar
function df_disable_comments_admin_bar() {
if (is_admin_bar_showing()) {
remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
}
}
add_action('init', 'df_disable_comments_admin_bar');
4) Using Plugin
If you prefer a no-code solution, use a plugin.
Recommended Plugin:
- Disable Comments plugin
Features:
- Disable comments globally or per post type
- Remove comment-related UI
- Lightweight and easy to use
Plugin URL: https://wordpress.org/plugins/disable-comments/
SEO Impact of Disabling Comments
Many users ask: Does hiding comments affect SEO?
Here’s the truth:
Positive Effects:
- Faster page load time
- Cleaner content structure
- Better user focus
Negative Effects:
- Less user-generated content (UGC)
- Reduced keyword diversity
Pro Tip (2026 SEO Strategy):
If SEO is important:
- Keep comments enabled on blog posts
- Disable comments wordpress pages
Best Practices (2026)
- Disable comments WordPress Pages only
- Keep comments on Blog posts
- Use anti-spam tools like Akismet
- Optimize UX by removing unnecessary elements
- Use plugins instead of editing core files (safer updates)
Common Mistakes to Avoid
- Editing theme files without backup
- Hide comments in wordpress pages globally without planning
- Ignoring spam protection
- Forgetting SEO impact
References
- WordPress Official Documentation: https://wordpress.org/support/
- Disable Comments plugin Plugin Page: https://wordpress.org/plugins/disable-comments/
- Akismet Anti-Spam Tool: https://akismet.com/
Conclusion
Hide comments in WordPress pages is a simple yet powerful way to improve user experience, reduce clutter, and enhance performance.
WordPress empowers website owners to tailor their content and provide an optimal user experience.
By hide comments on wordpress pages, you can streamline your content, reduce distractions, and create a seamless environment for your readers.
So, take charge of your WordPress pages, curate focused content, and leave a lasting impression on your audience by effortlessly hide comments in WordPress pages where they are not needed.
I hope this article helps to hide comments in WordPress pages.