Skip Navigation

[Résolu] Misunderstanding documentation on Building the "My Account" page

This support ticket is created Il y a 6 années. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : ,

Ce sujet contient 11 réponses, a 2 voix.

Dernière mise à jour par Christian Cox Il y a 5 années et 11 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1156475

Jas

I've created everyting for setting up "my account" login pages etc., following all the steps, according to the

https://toolset.com/documentation/user-guides/building-the-my-account-page/

But now I'm confused about how the user accesses this login. Which Login page am I supposed to add to the main nav? If I add a link in the main nav menu to the login form page, it's not complete. That is, it doesn't have the "new user register first" or lost password links, which are necessary for any login. But when I try to add the "my accounts" the link to the main nav, as a way of logging in, it also doesn't show up, (and I assume rightly so as the documentation said to hide it from logged out users within the Post groups access>logged in users only>My accounts). So how does one make this full login with all the necessary details of password reset/register accessable to the logged out/guest user then?

#1157309
Screen Shot 2018-12-02 at 3.17.29 PM.png

Which Login page am I supposed to add to the main nav?
Hi, I would use add the "My Account" page to a menu using the Custom Link option. See the screenshot here.

This way it won't be automatically hidden from Guests based on the Post Group.

#1157514

Jas

When I add the "My Accounts" page to the main nav menu, it is indeed hidden from my guests/non-logged in users. BUT that is NOT what I need. I need a login menu option to SHOW for guests here and it won't. It MUST show a login form that INCLUDES both create account and lost password links. I've followed the documentation and re-read them 25 times, and the only step that I feel I might not have followed correctly is the:

"Building a layout using a login form-Displaying a login form to visitors" Step of the page: https://toolset.com/documentation/user-guides/building-the-my-account-page/#hiding-the-my-account-page-from-visitors

It says: Navigate to Layouts.
2. Click Add new.

I don't know anything about layouts, but I've assumed that I am building a Content Template here. Was I wrong? And then later I've added the content template to the Post Group "logged in users only" in the errors under Guest user (which is unchecked, but then I went into edit mode to add the content template "Login Template".)

This is the only step where I can think I might have made a mistake.

Please please help! I've been working on this for a very very long time now and I just can't make it happen.

#1158066

Yes, I can see how this document is confusing. It's written for people who have implemented Toolset's Layouts plugin. Since your site uses Divi, it is not recommended to use Toolset Layouts. So the process will be a bit different for you.

I can see that you are using the Divi Builder to insert content in this Page:
lien caché
The Page also has a Toolset Content Template applied:
lien caché
The Content Template was empty, so nothing was appearing on this page for logged-in Users. To display the Divi Builder contents in this Content Template, you should insert the post content shortcode. I added that shortcode and now I can see the message that I am logged in as Toolsettech, with a Logout link. Can you confirm this is what you expect to see?

I can also see that the My Account Page was not added to the "Logged-in Users Only" post group. I made that change in the page editor screen, and now Guests can see the Forgot Password and New User registration links on the my-account page.

Please take a look and let me know if things are not looking more like you expected.

#1158199

Jas
access denied.png
menu nav no login.png
what to display.png
logged in members only.png

Ok so the content template "Template for Pages 3"
lien caché
Isn't one that I made. I think it was the Toolset contractor I used (who didn't finish what they started). I wasn't sure why it was showing up on the "my accounts" page, but I also didn't see adding it to this page
lien caché
in any of the documentation steps so I just ignored it.

The content template that I made was called "login Template" and the only place I assigned it to anything was as per documentation which says to add under "Logged-in users only" in access>post groups> under guests (which was unchecked)> edit. Please see screenshots. Am I supposed to add it to the My Accounts page also? (it doesn't say this in documentation.)

On my screen, I had always had My accounts toolset assigned to the post group "Logged in users only" (but I know I had taken it off just to see if that was a mistake in the documentation. But I thought I had put it back on. before writing you).

I still don't see a login menu option when I visit my site on the front end as a guest. (and in Login Template 3, all i'm seeing is one line that says [wpv-post-body view_template="None"].

Thanks so much for patience on this!

#1158574

Jas

sorry, just to clarify the above, right now, when I'm ALREADY logged in as a user, you're right, I can see both the "my account" and "logout" in the main nav menu and my name in the dashboard menu at right (the latter which I actually don't want them to access. they shouldn't have contact with dashboard) The Logout in this case is correct, (when I'm logged in, I should see an option to logout) BUT my whole issue is when I'm not logged in, when I'm a new visitor/guest to the site, I still don't see any login link in the main nav menu where they can click to register FIRST, and then login. I can confirm that this DOEST NOT show up on my end. There is no way for them to become a member of the site. I'm assuming I should still see the "my account" link in the main nav menu and when clicked as a logged-out/guest user it would then not actually go to the my accounts page (where I can list their resources), but instead it would then prompt the login form with "create new user"/"forgot passwords" (Which I understand is the content template "login Template" that I made.)
If I'm not communicating this well, would it be possible to set up a skype call or chat time so I can clarify at your convenience? I'm also fine with you making changes in my admin as with the time change (I'm in South east asia), its 24 hours between communication windows, making it difficult to get this straightened out in a timely fashion.

#1158859

Am I supposed to add it to the My Accounts page also? (it doesn't say this in documentation.)
No, the Content Template should not be added to the My Accounts page.

I still don't see a login menu option when I visit my site on the front end as a guest.
The My Account link should be added to the menu as a Custom Link, not a Page link. Please refer to my earlier comment, and change this menu item: https://toolset.com/forums/topic/misunderstanding-documentation-on-building-the-my-account-page/#post-1157309

#1161464

Jas

Thanks Christian, I didn't skip your previous comment, it's just that I'd tried that same thing so many times (adding the" my account" via custom link) and it hadn't worked before. (yes even with clearing cache) I honestly don't know why this is working now, as from what see on my end it appears to be all set up exactly as I've had it set up before, (although maybe not when you looked at the site) so I'm still confused, although happy its working!
Except for one thing and that is though it takes the user to the my account page, it also gives the user access to the WordPress dashboard by putting the WP menu up above, which is really not ideal...how do I eliminate this access? (nobody except admin and editors etc. should ever see the wp dashboard-even a guest version)

#1162423

it also gives the user access to the WordPress dashboard by putting the WP menu up above, which is really not ideal...how do I eliminate this access?
That's the default WordPress behavior. If you'd like to hide the admin bar for certain User roles, you can accomplish that with custom code. Add this to your child theme's functions.php file, or create a new snippet in Toolset > Settings > Custom Code:

add_filter("show_admin_bar", function(){
  $hide_from = array('subscriber');
  if( is_user_logged_in() ) {
    $user = wp_get_current_user();
    $role = ( array ) $user->roles;
    return !in_array($role[0], $hide_from);
  } else {
    return false;
  }
});

If you want to hide the admin bar from other roles, add the role slug to the $hide_from array as a comma-separated list, like this:

$hide_from = array('subscriber', 'otherslug');
#1165309

Jas

Ok, this is great. So grateful for all your help. But so I know this is not normally what you guys do, but any chance I could have you add just that one snippet under Toolset settings? It's like the LAST thing I basically need to do to have this all functioning properly. (as I bought Toolset understanding it didn't require any code, and hasn't so far, and I would have assumed that the default would not show the wp dashboard. That just seems like it should go without saying...). Seems like it would be hard to hire someone for one small item like that:(

Les nouveaux fils créés par Christian Cox et associés à celui-ci sont repris ci-dessous :

https://toolset.com/fr/forums/topic/unable-to-add-custom-code-snippet/

#1165606

I don't mind copying and pasting that code for you but it's going to take longer than you following these steps:
- Go to Toolset > Settings > Custom code
- Create a new snippet and call it "hidebar", then edit the snippet.
- After the last line of code in the snippet, create a new line and paste the code from above.
- Click "Save and Close", then hover over the hidebar snippet and click "Activate". Done.

The login credentials you provided before are no longer working, can you provide updated credentials, or reactivate the previous account?

#1167369
#1167882

Hmm, I'm not able to add it either, and I see an error in the JavaScript console. I need to investigate this in more detail, so I'm splitting that into a new ticket: https://toolset.com/forums/topic/unable-to-add-custom-code-snippet/