Tag Archives: Post Visibility

How To Control Post Visibility In WordPress By User Roles, Login Status, Memberships & Password Protection?

WordPress site owners can easily acquire complete control over the visibility of posts. They can set which group of people can see what specific content on their website. This lesson guides you on making certain posts, pages, and other custom post types visible only to specific users such as logged-in users, users by their roles, and users with passwords to view the content.

How To Control WordPress Posts Visibility?

The edit screen of every post and page has a settings sidebar on the right, and there are two sections; Post and Block.

In the post section, there is a ‘Summary’ meta box that offers a visibility option as ‘Status’ on the top.

If you click the link next to ‘Status’ it shows you options to keep any post public make it private, or password protected.

How To Make Any Post Private In WordPress?

When you make any post private it becomes visible only to the site administrator and editors. Simply follow the steps:

  1. Create a new post or open any old post for editing
  2. On the right sidebar, click the ‘Post’ block
  3. Under the post section on top, click ‘Published’ or ‘Draft’ next to the ‘Publish’ option
  4. It will show you three options: Public i.e. default option, Private, and Password Protected
  5. Since you are making the post private select the ‘Private’ option
  6. Publish/Update the post and it will become private

The option makes the post private i.e. hidden from the logged-out users and visible only to the site admins and editors. These posts are hidden from subscribers, readers, feeds, and searches.

How To Show/Hide WordPress Posts Based On The User Roles?

As you can see, private posts are only visible to site admins and editors but what if you want to make certain posts visible selectively to specific user roles such as subscribers, authors, contributors, etc? You can do that also with any of the following plugins:

  1. Advanced Access Manager – The plugin enables you to manage access to your website content for any user role, individual user, or visitor. It also allows you to configure the default access to all posts, pages, custom post types, categories, and custom taxonomies.
  2. Membership Plugin – Restrict Content – The plugin offers you complete control over who can and who cannot view any content on your WordPress site. 

How To Password Protect Any WordPress Post?

  1. Create a new post or open any old post for editing
  2. On the right sidebar, click the ‘Post’ block
  3. Under the post section on the top right, click ‘Published’ or ‘Draft’ next to the ‘Status’ option
  4. It will show you three options: Public i.e. default option, Private, and Password Protected
  5. Since you are making the post password-protected select the ‘Password Protected’ option
  6. It will ask you to enter a password, enter the password you like to keep on post
  7. Publish/Update the post and it will become password-protected

Now you can share the link and password with those whom you want to read the post. Only the post title will show up on the home page and other archive pages and it would look something like this: Password Protected: Title of the Post.

It will also show this message in the post content area: “This content is password protected. To view it please enter your password below” and a field to enter the password of the post.

Unlike private posts which are completely hidden from logged-out users, a password-protected post shows the title of the post in the way mentioned above.

Now the question arises, is it possible to hide the title and password field of the password-protected post on home and other archive pages? Yes, you can do that also.

How To Hide Password Protected Post Titles From Home & Other Archive Pages In WordPress?

As we have discussed above, when you password-protect any post, the front end of the website shows the post title and a password field so that users with a password can view the post. Now if you want to hide this title and make it visible only to the users with a link and password then follow these steps:

  1. Navigate to Plugins -> Add New page to find and install WordPress Hide Posts, plugin
  2. Upon activation, visit Settings -> Hide Posts page to select where you want to use the plugin such as on posts, pages, or other content types
  3. Now open the password-protected post for editing
  4. Navigate to the ‘Hide Posts’ meta box on the right sidebar
  5. Tick where you want to hide the post such as on the home page, category pages, tags pages, search pages, and other archive pages, etc
  6. Update the post and now the protected title and password field will also be hidden on the front of your website. Only the users with a link would be able to enter the password.

How To Hide Any WordPress Post From Home, Category & Other Archive Pages?

The plugin mentioned above is not just for hiding password-protected posts but it allows you to hide any posts from the home page, category page, search page, tags page, authors page, RSS Feed, REST API, Post Navigation, and Native Recent Posts Widget, etc.

Simply install and activate the WordPress Hide Posts plugin then follow these steps to hide any post:

  1. Visit Settings -> Hide Posts page to select where you want to use the plugin such as on posts, pages, or other content types
  2. Now open the post (you want to hide) for editing
  3. Navigate to the ‘Hide Posts’ meta box on the right sidebar
  4. Tick where you want to hide the post such as on the home page, category pages, tags pages, search pages, and other archive pages, etc
  5. Update the post and the post will get unlisted from the archive pages that you have selected

So these were all important parts of controlling the visibility of posts and pages on your WordPress site.