UsersWP redirects users / comment author links to the user profile page. It uses a page called “profile”. The page is blank (having dynamic content) and I have applied an elementor template to that page.
I have set this page to allow view for only selected roles, but even if not logged in, I can still view anyone’s profile page. So even this simple restriction is not working. (bug?)
What I really want to do, is for one role to view only their own profile, and another role to be able to view anyone’s profile. Visitors (not logged in) should not be able to view anyone’s profile. How can this be done?
Thank you for your help.
Using user role editor pro Version 4.50.5 with WordPress 5.1.1 and Elementor v2.5.15 with Elementor Pro v2.5.8
and userswp version 1.1.1
It may be an issue of this special setup. I may investigate it. If that’s applicable send admin login credentials to support [at-sign] role-editor.com
Details about what page you try to restrict will be useful also.
I am having some success with using the shortcode method around each section of the profile page, but is there a shortcode that limits a role to user’s own data (so they only see their own profile and not other user’s profiles)?
‘user_role_editor’ shortcode has ‘users’ attribute which allows to show content for selected user(s). But it’s static.
If you would build shortcode dynamically to insert current user ID for current user with ‘volunteer’ or ‘volunteer coordinator’ roles it may work. But in this case you do not need shortcode from URE and can show/hide page content itself I suppose.
‘profile’ page itself or shortcode inside it know nothing about whose profile will be shown via this page. So I don’t imagine how URE can help you with realizing needed model of view permissions for such dynamic content.