I am looking for a way to ensure that for user are authenticated before they can access that system want to redirect to login page if they are not logged in. I have looking for the redirection to happen at the backend. Any help would be greatly appreciated.
thanks
Please let me know what you need.
I understand that you want to redirect visitors of your Website to a Login Page (preferably WordPress Login) and only after they Login, they can see your content?
This is possible by controlling the whole Post Types with Access and removing Guest Access, so to then apply a Content Template or even Layout for the Guest Role.
https://toolset.com/documentation/user-guides/setting-access-control/ > Choosing what to Display When Read Access is Denied
After, you can insert a Toolset Login form to that Content Template or Layout, and that will then let the Guest log in.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-login-form
If you need to hide only certain parts, you can do the exact same but using ShortCodes that wrap the content no one should see.
Then, instead of that content, you display the Login Form and after the Guest is logged in, you can display the actual content:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
Thanks!