Skip Navigation

[Resolved] Login Logout Menu links and Redirection

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to have a login/logout button.

Solution:

This can be achieved by using the following plugin.
https://wordpress.org/plugins/login-or-logout-menu-item/

This support ticket is created 6 years, 1 month ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 11 replies, has 2 voices.

Last updated by WayneH4064 6 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1191313

Tell us what you are trying to do?
I want to use my site's primary menu to have dynamic links for logging in and logging out - this is, it will show a login link to logged out users and a logout link to logged in users. Login and logout would redirect to specific page. Currently my login page is at hidden link (post id is 207308) and uses this shortcode: {!{wpv-login-form redirect_url='hidden link'}!}. The "Log Out" link could also redirect to hidden link because logged out users on that page are shown a login form.

Is there any documentation that you are following?
I've looked at several posts, none seem to deal with this specifically.

Is there a similar example that we can see?

What is the link to your site?
hidden link

#1192185

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Wayne,

Thank you for contacting our support forum.

Are you currently using our Access plugin ? If so please let me know as we should be able to set this up using Access.

Thanks,
Shane

#1192248

Hi Shane
I am indeed using Access.
Thanks
Wayne

#1192255

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Wayne,

What you can do is to create the login page and my account page.

For the login page you can add it to an access group where only guests have access to the page. This page will then be added to the menu and will only be visible to logged out users.

Then you create a my account page and this page will only be accessible to user who are logged in and this page when added to the menu will only be able to be seen by users who are logged in.

Please let me know if this helps.
Thanks,
Shane

#1192258

Hi Shane
This give me the logout link in the content area of the "my account" page but not in the primary menu. Maybe I'm missing something.
Thanks
Wayne

#1192274

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Wayne,

Is the My Account page a single page itself ?

#1192679

Yes, it is.

#1192757

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Wayne,

Mind allowing me to log in to check this out how its done ?

The private fields have been enabled for your next response.

Thanks,
Shane

#1193312

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Wayne,

I see that you didn't add the logout page link to the menu.

Add it to the menu item and it should allow you to log out.

Thanks,
Shane

#1193350

Hi Shane
I'm not sure what I should be adding to the logout page. When the user click the "logout" link in the primary menu, I want them to be logged out immediately and ideally be redirected to a specific page (probably the homepage or possibly elsewhere).
Thanks again for your help. Feel free to login again using the same credentials.
Wayne

#1193363

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Wayne,

The best way i see of achieving this is by using a 3rd party plugin.

I was able to stumble on this plugin below which should be able to help you with this.
https://wordpress.org/plugins/login-or-logout-menu-item/

Thanks,
Shane

#1193473

I was able to achieve what I wanted by using the Login Log Out Menu Item plugin in combination with the Toolset Access plugin.
My issue is resolved now. Thank you!