Roconpaas

Blog

How to Hide a Page on WordPress – Easy Rocon Tutorial

April 11, 2025 by James

WordPress Keeps Logging Me Out

Introduction

How to hide a page on WordPress: WordPress is an extremely useful website platform with numerous applications, whereby individuals can create and manage content at their whim. But what if you don’t want certain pages accessible to the public? For privacy, development, or content management purposes, WordPress has several ways to conceal pages from visitors, search engines, and navigation menus.

Throughout this comprehensive guide, we will explore why you might ever have to hide a page, the techniques available to use, and instructions on how to implement each. Whether you’re a developer, small business owner, or a blogger, this article will illuminate you and enable you to become an expert in hidden content.

Why Hide a Page in WordPress?

There are several reasons you may want to hide a page:

Why Hide a Page in WordPress

  • Work in Progress: You’re still designing or writing the content.
  • Private Content: You only want certain users or clients to view the page.
  • Archived or Deprecated Pages: Pages no longer relevant but still needed for internal reference.
  • Marketing Campaigns: Landing pages for specific audiences that you don’t want accessible to the general public.
  • Membership or Restricted Access Pages: Content available only to paying members or subscribers.

Understanding your reason will help you choose the best method to hide the page.

Method 1: Set the Page to Draft or Private

Step-by-Step:

Set the Page to Draft or Private

  1. Go to Pages > All Pages in your WordPress dashboard.
  2. Click Edit on the page you want to hide.
  3. In the Publish panel, locate Visibility.
  4. Select either:
    • Private – Only admins and editors can view the page.
    • Draft – Keeps the page unpublished.
  5. Click Update to save changes.

When to Use:

  • Hiding content in development.
  • Keeping content internal.

Pros:

  • Simple and quick.
  • Built-in WordPress functionality.

Cons:

  • Private pages still accessible to logged-in users with proper roles.

Method 2: Password-Protect the Page

Step-by-Step:

Password Protect the Page

  1. Go to Pages > All Pages.
  2. Click Edit on the desired page.
  3. Under Visibility, choose Password Protected.
  4. Enter a secure password and click Update.

When to Use:

  • You want to share the page with select individuals without requiring logins.

Pros:

  • Adds a layer of control without plugins.
  • Easy to share.

Cons:

  • Not suitable for sensitive or secure data.
  • Password can be shared freely.

Method 3: Remove the Page from Navigation Menus

Step-by-Step:

Remove the Page from Navigation Menus

  1. Go to Appearance > Menus.
  2. Locate the page in the current menu structure.
  3. Click the down arrow on the menu item.
  4. Click Remove.
  5. Save the menu.

When to Use:

  • You want the page accessible via direct link but not easily discoverable.

Pros:

  • Keep the URL live.
  • User-friendly for campaigns or special pages.

Cons:

  • Page is still indexable by search engines unless additional steps are taken.

Method 4: Use a Plugin to Hide the Page

Plugins can offer more flexible options to hide pages based on user roles, logged-in status, or even schedules.

Recommended Plugins:

  • Restrict Content
  • Members
  • WP Hide Post
  • Visibility Control

Example: Using WP Hide Post

Hide the Page using WP Hide Post

  1. Install and activate the plugin.
  2. Edit the page you want to hide.
  3. Scroll down to Post Visibility Options.
  4. Choose where the page should be hidden (e.g., front page, category pages, search results).
  5. Save the page.

Pros:

  • Granular control.
  • Hide based on multiple conditions.

Cons:

  • Adds plugin overhead.
  • Can conflict with themes or other plugins.

Method 5: Use Robots.txt or Meta Tags to Block Search Engines

To hide a page from Google and other search engines, you can use robots.txt or meta noindex tags.

Robots.txt Method:

Hide the Page Using Robots.txt

  1. Go to your hosting account or use an SEO plugin to edit robots.txt.
  2. Add the following:

Disallow: /your-page-slug/

Meta Noindex Method (via SEO plugin like Yoast):

Hide the Page Using yoast

  1. Install and activate Yoast SEO.
  2. Edit the page.
  3. Scroll to the Yoast SEO box.
  4. Click the Advanced tab.
  5. Set Allow search engines to show this Page in search results? to No.
  6. Update the page.

Pros:

  • Prevents indexing without affecting visibility to users.

Cons:

  • Page still accessible via direct URL.
  • Not guaranteed immediate removal from SERPs.

Method 6: Use Conditional Logic in Code

Advanced users can hide a page using PHP or template logic.

Example:

Edit your theme’s functions.php file to redirect visitors from a specific page:

function redirect_specific_page() {

  if (is_page(‘your-page-slug’) && !current_user_can(‘manage_options’)) {

    wp_redirect(home_url());

    exit;

  }

}

add_action(‘template_redirect’, ‘redirect_specific_page’);

When to Use:

  • Developers seeking custom control over visibility.

Pros:

  • Highly customizable.

Cons:

  • Risk of breaking the site if code isn’t implemented properly.

Best Practices for Hiding Pages

  • Always test after hiding a page to ensure it’s working as expected.
  • Use a combination of methods (e.g., remove from menu + no index tag).
  • Keep a list of hidden pages for internal tracking.
  • Avoid linking to hidden pages publicly unless intended.

Use Cases by Role

Bloggers:

  • Hide draft posts or landing pages.
  • Create password-protected resources.

Businesses:

  • Gate client pages.
  • Use hidden landing pages for A/B testing.

Developers:

  • Hide staging or test pages.
  • Apply conditional access rules via code.

Common Mistakes to Avoid

  • Relying only on menu removal without protecting access.
  • Forgetting to add a noindex tag for private pages.
  • Exposing sensitive data via publicly accessible URLs.
  • Not communicating password-protected page access to users.

Additional Insights

Being hidden is not necessarily synonymous with being completely secure. For example, the direct link still can access the page if anybody has it, unless the page is protected with a password or restricted with a user role. This is why applying means in combination, such as menu removal and password protection, may have stronger control over content.

Also, if you’re working in a team, it’s helpful to communicate clearly about which pages are hidden and why. Adding notes in your WordPress dashboard or using a project management tool can keep everyone aligned and prevent mistakes like sharing unfinished content.

It’s also a good practice to check your list of hidden pages regularly. You could eventually lose track of which ones are live and which ones are hidden, creating clutter or abandoned resources that still occupy space on your server.

There are even some sophisticated plugins that enable scheduling page visibility. It is useful for seasonal offers, limited-time content, or events. With scheduling, a page can be made visible in a campaign and hidden automatically afterwards.

Lastly, never forget the user experience. It’s great to be able to conceal content that’s not yet ready or not suitable for all, but ensure navigation remains smooth, error-free, and there are no dead links to concealed content.

Conclusion

How to hide a page on WordPress: simple and versatile, with settings from native visibility controls to complex conditional logic. Whether you have internal content to keep out of sight, are developing for future launch, or need to limit access, WordPress has a range of tools for your purposes.

By choosing the correct method from your use case, you can guarantee both user experience and security. Whether you’re an enterprise-level developer or a casual blogger, the ability to hide a page correctly is one of the essential skills in working with any WordPress site.

Start the conversation.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Recommended articles

    WordPress

    How to Create WordPress Developer Portfolio: Guide by Rocon

    Nithin

    Icon

    7 Min Read

    WordPress

    How to Hide a Page on WordPress – Easy Rocon Tutorial

    James

    Icon

    8 Min Read

    WordPress

    How to Remove Noindex Tag in WordPress: A Complete Guide

    Maria

    Icon

    9 Min Read