One of the most frequently asked questions by new users ofElementor is how to hide a section, or a page for a non-logged-in user? One of the best ways to do this is to use the Happy Addons plugin. This plugin comes with tons of pre-made layouts that you can use to create a section visible only to logged in users. Here is a step by step tutorial on how to use Happy Addons to create a section that is only visible when the user is logged in.
1. Install and activate Happy Addons Pro
Before hiding a section from a non-logged-in user, you must first install Happy Addons on your WordPress site. The procedure is classic go to: Extensions – Add – search – install – activate.
The Happy Addons plugin then appears on the sidebar of your WordPress dashboard.
Lire aussi How to add phone number link in Elementor
2. Enable display condition
After installing Happy Addons, you need to activate the display condition. Otherwise it will not be possible to hide a section or a page. And to do so, follow these steps: happy addons >> and finally enable the feature DisplayCondition.
3. Apply the display condition
As an example, we will hide the section containing the site header to illustrate the procedure.
Proceed as follows:
- Click on the button Edit Section to access the section settings,
- Then select from the tab Advanced,
- Then on Happy Features,
- Activate the display condition by flipping the switch to the right,
- Then apply the condition to the value HideElement,
Finally, we will define the visibility condition for the user.
- Select login status (connection status),
- Then the value is not in the second field
To apply these changes, you just need to update the page.
Lire aussi Elementor: How to Add Pagination
Conclusion
Restrict from contents may sometimes prove necessary if we want to encourage visiteurs to create an account. In this article, we showed you how to achieve this with Happy Addons. Besides, login status is not the only condition, one can also apply it to operating system, browser, time, date range, etc.