I have a view that should only be visible to logged in users (menu item controlled by nav_menu and the users of a specific role can display the filtered view. At the moment if any the user (or not even logged in) enters the url of the view page, the view displays.
I have added posts and pages to access control.
I can't find a document that provides recommends a way to control the access to pages that contains views.
Hello. Thank you for contacting the Toolset support.
If you just wanted to check user is logged in or not. You can check it using [wpv-conditional] shortcode. Please try to use following code:
[wpv-conditional if="('[wpv-current-user info='id']' ne '')"]
User is logged in - add your view here
[/wpv-conditional]
[wpv-conditional if="('[wpv-current-user info='id']' ed '')"]
User is NOT logged in
[/wpv-conditional]
Thanks for the information but my question was
What is the recommended way to control access to views?
This is with an assumption of using Toolset Access to control who can see the view.
On the front end.
I have made changes to Toolset Access to limit the who can see the post type that the view is based on, but it does not seem to stop the view being seen by anybody.
I could find specific documentation on how to control the access to a view so it is only visible to a role on the front end.
On the page in question
I have enabled elementor pro for editing and have 1 view.