I am trying to: Get the My Account page to show account information if the user is logged in and show a login form if they are not logged in.
Link to a page where the issue can be seen: gcc.onesparkdev.com/my-account
I expected to see: The My Account link in the main navigation
Instead, I got: No My Account link in the main navigation. If you type in the URL to the page, the access control works as it should. And if the user logs, in, the My Account page shows up in the navigation. However, if you are not logged in, cannot get the My Account page link to show up in the navigation. That is the problem I'm having.
Hello,
How do you setup the page "My Account"? I assume you are using Toolset Access plugin.
Please edit the page "My Account", check this:
1) In section "Post group", if it is setup as:
xxx permissions will be applied to this post
Edit xxx group privileges, you will need to enable the option for "Guest" user, so if you are not logged in, you get the My Account page link to show up in the navigation.
2) In the content of page "My Account", use Access shortcode to display a login form, for example:
[toolset_access role="Guest" operator="allow"]login form here ...[/toolset_access]
For other user roles, display something else, for example:
[toolset_access role="Guest" operator="deny"]Display something else[/toolset_access]
More help:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
I apologize, but I'm not quite understanding your instructions. I have attached 3 screenshots to this post so that you can see the two Post Groups that I have set up. One shows that only the Pro Members who have signed up and are signed in should be able to access certain pages. The other Post Group is for logged out users (or Guests). In the one where Guests is NOT selected, I have used a Layout form to display to the Guests if they are not logged in. (This is the 3rd image I uploaded for you.) Is there a better way of doing what I've done? IF it would help, you can turn on Private Messaging so that I can send you the WP login credentials and I can have you log in and see exactly what I have set up because, the way I've set everything up right now is based on a tutorial that I found on the Toolset site describing how to build a Membership site. And like I said, the functionality of "who can see what" is working fine. The problem I'm having us just getting the link for the page to show up in the navigation, even though I did exactly what was described in the Toolset How To Build A Membership Site tutorial.
Thanks so much for your help.
I have enabled the Private Messaging box, please provide the credentials of your website, thanks
Thanks for the details, I can login your website, here is what I found:
1) The page "My account" is using below setting:
Logged-in Users Only permissions will be applied to this post.
hidden link
2) The post groups "Logged-in Users" :
hidden link
You disabled the option for "Guest" user, so all Guest user will not be able to see the item "My account" in the navigation menus. And it conduct the problem you mentioned above:
The My Account link in the main navigation
As I mentioned above, you can use Access shortcode to achieve what you want, and I setup a demo in your website:
1) Create a page "My account 2" with below codes:
hidden link
[toolset_access role="Guest" operator="allow"]login form here ...[/toolset_access]
[toolset_access role="Guest" operator="deny"]Display something else[/toolset_access]
2) Put above page into wordpress menus:
hidden link
Then test it in front-end, logged-in user and guest user can see the item "My account 2", but this page display different content for different users.
More help:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/