Last modified: December 17, 2015

When we have some membership related requirements, we need to use a membership software like MemberPress or S2 Member. These are complete solution for a business membership website. But sometime we just need to hide or show some content for registered users and same goes for unregistered users.

For example, you want to show an application form only for unregistered users and want registered WordPress away from that form. Most of the membership plugins offer just to hide content from unregistered user. Barely we find a hack that let us hide a piece of content from registered users.

In this post, I am going to introduce you with an amazing, light weight and easy to use plugin, with the help of which you can show / hide specific post content not only from the registered and unregistered users but also specify content for a particular user role.

For instance, you have written some text that should be visible for editors but not for administrators or any other role, you can do it adding a shortcode that works for editor role.

Content Locker WordPress

So let’s find out how the plugin works.

Private content plugin

Private content is a free plugin available on WordPress repository. You can install it straight from your WordPress plugin dashboard.

Just install and activate the plugin and start using the shortcodes provided by the plugin.

Below is the complete list of short codes that works with the plugin

Content for only administrator[private role=”administrator”]Content goes here[/private]

Content for only administrator and editor[private role=”editor”]Content goes here[/private]

Content for only administrator and editor and author[private role=”author”]Content goes here[/private]

Content for only administrator, editor, author and contributor[private role=”contributor”]Content goes here[/private]

Content for only administrator, editor, author, contributor and subscriber [private role=”subscriber”]Content goes here[/private]

 

Content for editor only[private role=”editor-only”]Content goes here[/private]

Content for author only[private role=”author-only”]Content goes here[/private]

Content for contributor only[private role=”contributor-only”]Content goes here[/private]

Content for subscriber only[private role=”subscriber-only”]Content goes here[/private]

Content for visitor only[private role=”visitor-only”]Content goes here[/private]

You can also specify text for a specific registered user with the help of the following shortcode;

Content for a specific user –  [private role=”none” recipient=”login-name”]Content for one specific registered user[/private]

You can display alternative text for users who are not allowed to see the content. For instance if you have wrapped some content with a shortcode for authors, you can also add alternative text for non-authors as given below

[private role=”author-only” alt=”content for non-authors.”]Content for authors only[/private]

If you are looking for a full featured membership WordPress plugin, consider S2 Member and MemberPress.

How to use the plugin

  • First install and activate the plugin
  • Go to the desired post and then edit it
  • For example you want to hide an image for registered users then use the following code – [private role=”visitor-only”]IMAGE[/private]

DOWNLOAD THE PLUGIN

[emaillocker id=2873]Download the Plugin[/emaillocker]

About Shams

Shams, a professional blogger, has expertise in WordPress and Web Hosting. He is used to playing around with WordPress plugins, themes, web hosting services and some other innovative stuff regarding web design. He sifts out good stuff for web designers and reviews it to help them choose what they really need.

Being an energetic tech enthusiast, he regularly pens down breaking news and tutorials related to technology particularly Smartphones and other gadgets. Sometimes writes tech tips too. It was the dawn of Internet age when he started dabbling in it and has since been delving into the realm of the internet. He occupies a permanent burrow in virtual world.

He can be reached at.- here

Related Post

Increase more than 700% of Email Subscribers!
Dolor aliquet augue augue sit magnis, magna aenean aenean et! Et tempor, facilisis cursus turpis tempor odio. Diam lorem auctor sit, a a? Lundium placerat mus massa nunc habitasse, arcu, etiam pulvinar.
  We hate spam and never share your details.
Blogging and Web Design
GET IT NOW
500% MORE SUBSCRIBERS
EFFICIENCY
BOOST YOUR SALES
CREATIVITY
INSPIRE YOUR VISITORS
BE UNIQUE
CREATE UNIQUE POPUPS
Get amazing content to your mailbox
We never bother our subscribers and, we deliver what they want
Your Information will never be shared with any third party.
You are successfully subscribed to webcusp newsletter. Please check your mail and confirm your subscription.
Subscribe for Updates
We never bother our subscribers and, we deliver what they want
Your Information will never be shared with any third party.
You are successfully subscribed to webcusp newsletter. Please check your mail and confirm your subscription.
Follow us for exclusive content