hi there,
I have a "create camp" form that is supposed to be hidden from guest users. If i press "Opret camp" in the header it works perfectly - the user is being redirected to the page with the login form if they are not logged in.
But if i link to the "create camp" form on another place on my page - let's say a simple link in a text - the link shows the page with the create camp form instead of redirecting to the login form. Is it possible to make the entire page with the create camp form hidden for guest users?
Hi Mai,
Thank you for contacting us and I'd be happy to assist.
I've noticed that the "Welcome host" page (/welcome-host/) is correctly added in the access post group named "Logged in only".
( ref: https://toolset.com/lesson-placement/lesson-placements-1621543-1655635/ )
When a logged-in user visits this page, the form to add a new camp is showing and the guest visitors see the "Page not found" message.
Now, to show a login form to these guest visitors instead, you can create a new content template and insert the login form in it. After that, you can select it to be shown when "not allowed" in the settings of the post group "Logged in only".
These steps are explained here:
https://toolset.com/lesson-placement/lesson-placements-1622969-1622351/
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar,
i already have the login form but it is on a page - is it possible to just redirect to this page?
hidden link
When i access the links on the page that link to the form, I can still see it even though I am not logged in. This is what i want to change.
Thanks for writing back.
I'm afraid, there is no option available in the post group restriction settings to redirect visitors to a different page. But the steps suggested in that guide from my last step are fairly simple too.
1. You'll create a new content template with a name something like "Template With Add New Camp Host Form", from WP Admin -> Toolset -> Content Templates.
In the content of this template, you'll only need the user form named "Camp host" (that you also have on the /signup-host/ page).
2. After that, you'll go to WP Admin -> Toolset -> Access Control -> Post Groups, and in the no access settings for the "Guests" under the "Logged in only" post group, select this newly created content template from step 1.
( screenshot: hidden link )
As a result, if guests will try to visit the /welcome-host/ page ( or any page with the "Logged in only" post group ), they'll see the "Camp host" form and not the regular content that is shown to logged-in users.
Oh my gosh thank you Waqar - it seems to work!
My issue is resolved now. Thank you!