How to redirect users when not logged in
I want to redirect the unregistered/logged out users to the login page when they try to add a topic just like on this forum when I clicked on add topic I was redirected to the login page. I tried reading blogs and documentation but didn't understand how to do it.
I also wanted to display the text like Login to like the post/ comment similar to your forum how can I do it?
Also, is it possible to let the user enter the topic first, and at the time they click on post-it redirect them to the register/login page with a message?
It would be a great help if you could provide step by step solution.
Please exclude wpForo page from W3 Total Cache (or any caching).
There are extended docs on this site about user levels and what they are allowed to do and what not.