Introduction
Overview
The Private Comments plugin for WordPress is a privacy-focused tool designed to transform public comment sections into private communication channels. By default, WordPress comments are visible to every visitor on a post. This plugin modifies that behavior, ensuring that discussions remain strictly between the commenter, the content creator, and the site management.
This functionality is ideal for sites that require confidential feedback, personalized coaching, or secure communication between users and authors without the overhead of a full helpdesk system.
Key Features
- Automated Privacy: Once activated, all comments are immediately restricted across the entire site.
- Role-Based Visibility: Visibility logic is baked into the plugin, requiring no complex permissions management.
- No Configuration Required: Works out-of-the-box with standard WordPress comment systems.
- Lightweight Footprint: Minimal impact on database performance and site speed.
How It Works
The plugin filters the comment queries and display logic to verify the current user's identity against the comment's metadata. Visibility is granted only if the user meets one of the following criteria:
- The Comment Author: The user who originally wrote the comment.
- The Post Author: The user who published the post or page where the comment resides.
- The Administrator: Users with site-wide administrative privileges.
Visibility Matrix
| User Role | Can See Own Comments | Can See Others' Comments | | :--- | :---: | :---: | | Guest / Subscriber | Yes | No | | Post Author | Yes | Yes (on their posts) | | Administrator | Yes | Yes |
Typical Use Cases
1. Educational Platforms
Instructors can provide feedback on a student's submission (via comments) that other students cannot see, turning the comment section into a private critique area.
2. Lead Generation & Support
Potential clients can ask questions about a service or product, sharing sensitive details (like contact info or project requirements), knowing that only the site owner can view the query.
3. Internal Feedback
For multi-author blogs, editors and authors can use the comment section for internal notes on a post that remain hidden from the public front-end.
Usage
The plugin is designed for "set and forget" usage. There are no settings pages or shortcodes to manage.
To verify the plugin is active, you can check the front-end of any post while logged out or as a standard user. You will notice that while the comment form remains (if enabled in WordPress settings), the list of existing comments from other users will be hidden.
// Example: The plugin hooks into WordPress core filters
// to automatically modify the comment loop.
// No manual code implementation is required by the user.
For developers looking to extend this behavior, the plugin utilizes standard WordPress comments_clauses and the_comments filters to ensure compatibility with most themes that follow the WordPress Theme Handbook.