Restrict for Elementor

How to Show or Hide Elementor Content to Logged In Users

If you want to show content to logged in users only in Elementor – or do the opposite and hide something from them – Restrict for Elementor gets it done in a few clicks, with no code. You can apply the rule to any section, column or widget straight from the Elementor editor. In this guide you will set up both directions: showing content exclusively to logged in users, and hiding content from them.

Before you start

You will need the Elementor page builder and the Restrict for Elementor plugin installed and activated. A free version of Restrict for Elementor is available on WordPress.org, and premium licenses (1, 5 or unlimited sites, billed yearly or as a one-time lifetime payment, starting at $39 per year) are listed on the pricing page. If this is your first time using the plugin, the quickstart guide gives you an overview of all restriction criteria.

Show content to logged in users only in Elementor

  1. Edit your page with Elementor and select the section, column or widget you want to restrict.
  2. Open the Content tab and find the Restrict area.
  3. Select Logged in users from the dropdown menu.
  4. Set the Action to Show.

With this option selected, the plugin effectively checks whether the visitor is logged in or not, and displays the affected content only if they are. Logged out visitors will not see the element at all.

Logged in users condition with the Action set to Show in the Restrict area of Elementor

Hide content from logged in users

Using the same criteria but with the Action set to Hide, you can reverse the logic and hide the content from logged in users – which effectively makes it visible to logged out visitors only.

Logged in users condition with the Action set to Hide in the Restrict area of Elementor

Example: login form and members-only content on the same page

Let’s say you have a page with some content that should be visible to logged in users only. At the same time, you want to make it easy for users to log in on that very page. Here is how to build it:

  1. Add a login form widget and restrict it with Logged in users and the Action set to Hide. The form is now visible only to logged out visitors.
  2. Add a text widget with the members-only content and restrict it with Logged in users and the Action set to Show.

Visitors first see just the login form. As soon as they log in, the form disappears – there is no point displaying it anymore – and the restricted content appears in its place, all on the same page with no redirects.

Show a message instead of hiding the content

Instead of hiding the element entirely, you can display custom alternative content to users who do not fulfill the required criteria – for example a styled Elementor template inviting visitors to register, or a short formatted text message such as “Log in to view this content”. Read more in the alternative content guide.

Tips

  • Test the logged out view in a private or incognito browser window – while building the page you are normally logged in as an administrator, so the page can look different to you than to a visitor.
  • The steps above work the same for sections, columns and widgets. See restricting Elementor sections, columns and widgets for where the controls sit on each element type.
  • Need finer targeting than logged in or not? Restrict by user role or by user capability instead.

Frequently asked questions

What do logged out visitors see where the restricted element was?

By default, nothing – the section, column or widget is simply not rendered, and the rest of the page flows as if it was never there. If you would rather show a notice or a call to action in its place, use the alternative content feature.

Can I restrict a whole page instead of a single element?

Restrict for Elementor works on the element level – sections, columns and widgets. If you want to restrict entire pages, posts or custom post types, that is what our Restrict for WordPress plugin is for, and both plugins are available together in the Restrict Bundle.

Related documentation