Skip to content
Sign in
Hide A Post icon

Hide A Post

A WordPress plugin to hide posts from non-Administrators on the site, in search, and in WordPress admin by category.

Not scanned yet WordPress plugin

Install in

No install steps yet

Follow the steps on the source page.

Hide A Post lets Administrators keep selected categories—as well as default-category (Uncategorized) posts authored by Administrators—hidden from Editors and other non-Administrator users across the site, search results, WordPress admin, and direct REST API / post-ID access.

Hide A Post Settings

Go to Settings Hide A Post and check the categories you want hidden from non-Administrators (for example, Awesome and Spicy).

Example Posts (seen by Administrators)

  1. Tomato (Owner: Administrator, Categories: Fruit, Red)
  2. Potato (Owner: Administrator, Categories: Vegetable, White)
  3. Broccoli (Owner: Administrator, Categories: Vegetable, Green)
  4. Mushrooms (Owner: Administrator, Categories: Vegetable, White, Awesome) – Hidden from non-Administrators via “Awesome”.
  5. Apple (Owner: Administrator, Categories: Fruit, Red)
  6. Pear (Owner: Administrator, Categories: Fruit, Green, Awesome) – Hidden from non-Administrators via “Awesome”.
  7. Peppers (Owner: Administrator, Categories: Vegetable, Green, Spicy) – Hidden from non-Administrators via “Spicy”.
  8. Peach (Owner: Administrator, Categories: Uncategorized) – Hidden from non-Administrators as an Administrator-authored default-category post.
  9. Blueberries (Owner: Administrator, Categories: Fruit, Blue, Uncategorized) – Still hidden while in the default category.
  10. Raspberries (Owner: Editor, Categories: Fruit, Red, Awesome) – Hidden from non-Administrators via “Awesome”; visible to Administrators.

Example Posts (seen by Editors)

  1. Tomato (Owner: Administrator, Categories: Fruit, Red)
  2. Potato (Owner: Administrator, Categories: Vegetable, White)
  3. Broccoli (Owner: Administrator, Categories: Vegetable, Green)
  4. Apple (Owner: Administrator, Categories: Fruit, Red)

About the plugin

We wanted to use WordPress with our tabletop gaming group. This enables everyone to collaborate on content creation while allowing the Dungeon Master to keep certain “secrets” hidden.

Written by Joobi from the project's own listing. See the source page

categoryhidepathfinderpoststabletop gaming
28 Nov 2026
Version 2.0.0 released. Not scanned yet.

2.0.0

  • Modernized plugin architecture for WordPress 7.0+ (tested up to 7.1) and PHP 7.4–8.5.
  • Fixed fatal TypeError crash when listing posts via WP-CLI.
  • Replaced comma-separated category text input with hierarchical category checkboxes on the settings screen.
  • Replaced hardcoded wp_ table prefixes and raw SQL interpolation with dynamic $wpdb table names, qualified columns, and parameterized NOT EXISTS queries via $wpdb->prepare().
  • Blocked direct access to hidden posts by ID: capabilities (map_meta_cap, including WP_Post arguments), REST API reads of posts and their sub-resources (404 before the endpoint runs), revisions, oEmbed, old-slug redirects, and canonical/404 slug-guess redirects.
  • Hid comments on hidden posts from comment queries, the REST API, the comments feed, and Recent Comments, and closed new comments on them.
  • Filtered classic menus and Navigation blocks, including nested submenus and REST menu-items and wp_navigation responses, so links to hidden posts are not shown to non-Administrators (stored menus are not changed).
  • Redacted hidden post titles read by ID (such as Media Library parent labels) to “(Private post)” for non-Administrators.
  • Blocked the per-post comments admin screen (edit-comments.php?p=) for hidden posts.
  • Scoped Empty Trash to the posts the current user can see.
  • Blocked non-Administrators from deleting hidden categories, including through bulk category deletion.
  • Linked attachments of hidden posts by ?attachment_id= so the parent post’s slug is not exposed.
  • Excluded hidden posts from previous/next post links, wp_get_archives(), and get_posts() calls that use suppress_filters.
  • Treated every user with the manage_options capability (plus Super Admins on Multisite) as an Administrator for the default-category rule.
  • Removed deleted categories from the saved settings automatically.
  • Added the hap_user_can_view_hidden_posts, hap_should_filter_query, hap_hide_admin_default_category_posts, and hap_administrator_ids filters.
  • Added PHPUnit integration tests (single site and Multisite) to CI.
  • Replaced deprecated screen_icon() and role-name capability checks with modern Settings API markup and manage_options capability checks.
  • Moved option cleanup from deactivation hook to uninstall.php so deactivating the plugin preserves saved settings.
  • Used WordPress’s default_category option instead of hardcoding the English string “Uncategorized”.

1.1

  • Enhanced code to allow for more than one administrator.
  • Improved SQL statements.
  • Fixed bug with duplicate posts being displayed.

1.0

  • Initial release.
21 Dec 2019Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)