Hiding Content from Logged-In Users in Joomla

hiding content joomlaIn this tutorial, we'll show how to hide content form logged in Joomla users.

Why would you want to hide information from logged in users? The most common reason to do this that you want to encourage visitors to join the site. Then, if a visitor logs in, they no longer need to see the "join now!" content.

We're going to show you how to do this in both Joomla 2.5 and Joomla 3. The setup in Joomla 3 is a little easier.

User Groups

media_1386085113515.png
  • From the Administrator side, go to Users > Groups.
  • If you're using Joomla 2.5, you'll need to add a new Guest group that has Public as its parent. In Joomla 3, just verify that it's already there.

Viewing Access Levels

media_1386085256062.png
  • Go to Users > Access levels.
  • In Joomla 2.5, you'll need to add a corresponding access level called Guest. In Joomla 3, just verify that it's already there.

Set the Guest User Group

media_1386085413456.png
  • From the Users Screen, click on the Parameters icon.
  • Look for the Guest User Group and set it to Guest. In Joomla 3, verify that it's already done for you.

Add an Article for Non-Logged In Visitors

media_1386085730111.png
  • Go to Content > Article Manager > Add New Article.
  • Add the title and content you want the non-logged-in users to see.
  • Set the Access to Guest.
  • Set Featured to Yes, because we want this article on the home page, we'll s
  • Click Save & New.

Add an Article for Logged-in Visitors

media_1386085970387.png
  • Enter the title and body of article to be seen by your logged-in users.
  • Set the Access to Registered and the Featured to Yes. Then Save & Close from the toolbar.

Verify: Step 1 - Add a User

media_1386086239161.png
  • From Users->User Manager->Add New User
  • enter the login information of a new user: Name, Login Name, Password (twice) and email address.
  • Click on the Assigned User Groups and verify that it defaults to Registered.
  • Click Save & Close.

Verify: Step 2 - View Home Page While Not Logged In

media_1386086382517.png
  • Browse to the public side of the site.
  • Notice that the home page has the article that was set to Public access.

Verify: Step 3 - View Home Page While Logged In

media_1386086576301.png
  • Enter the User name and password of the user you created into the Login Form.
  • You'll now see the article on the home page that was set for Registered access, and NOT the article whose Access was Guest.

You can use this same process with menu items and modules for even more content hiding and showing. This technique is valuable for any site where you're encouraging people to join: Paid content sites, tutorial sites, dating sites, homeowner association sites, church membership sites. etc.