Restrict For Elementor
WordPress itself comes with several user roles right out of the box: Administrator, Editor, Author, Subscriber, etc. Many WordPress plugins are using their own custom user roles that are being created once that particular plugin is installed. Furthermore, you can also create your own, custom user roles by utilizing plugins such as this one. As you’re probably getting the idea by now, user roles in WordPress are quite useful for many things, especially when it comes to controlling which user can access what. So, it’s no surprise that Restrict for Elementor can utilize user roles as well and use them to make it possible for you to show or hide a section, column or widget in Elementor page builder based on what role a registered user has.
When you add a section, column or widget in Elementor page builder, in the Restrict area of the Content tab, you can select Users with specific role which will then reveal another field below where you will be able to select from the available users roles.
Of course, you can select multiple user roles if needed and make that content visible or hidden to the users with these specific roles.
Let’s say that you have some content on your website that should be visible to members only and users who should be able to access this content have their accounts registered with Members user role. Simply add a section, column or widget that you want to make available only to them and set the Action to Show, then select Users with specific role and then select Members in the field below.
You, as administrator, might also want to be able to access this content in which case you will have to select Administrator user role as well given that users with administrator user role can only see restricted content when editing the page but not on the front end unless they’re specifically allowed to.
Lastly, you can use alternative content to display some content to users who do not fulfill required criteria. More about this feature can be found here.