Skip Navigation

[Resolved] Need to have 1 login form that redirects based on WP_user-role

This support ticket is created 6 years, 4 months 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.

Our next available supporter will start replying to tickets in about 0.76 hours from now. Thank you for your understanding.

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 19 replies, has 3 voices.

Last updated by Shane 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#914877

Entering the Seller Credentials just created, I was send to a post/page that showed only the correct referrer form in the URL - only other thing on the post/page was the title Login. It should be the new Seller's My Account Page.
Is the logged-in Seller User redirected to the URL /my-account? If so, but the contents of the page are not what you expect to see, I think I know what is happening. Check the My Account page in wp-admin:
hidden link

This page's content is designed with the Divi Builder. It also has a Content Template applied, and the Content Template is also built with Divi Builder. The Content Template overrides the page design you created in Divi Builder. You can find the Content Template here:
hidden link
It doesn't have much content, it would say "Overview" and that's about it. If you expect to see the content you designed directly in the page editor, you can disassociate the Content Template from the My Account Page in the page editor screen, or you can recreate the Page's design in the current Content Template.

#917143

Hello, I am still standing by for your feedback here.

#919563

Ok, we have this down to this issue.
Created a page called "Login". On it I put {!{wpv-login-form}!}, accepting all the defaults for redirection, etc.
This should activate the PHP code that is looking for a login from role either ftm-puppy-seller or ftm-puppy-buyer and redirect to the appropriate account page.
When I enter the credentials for a registered Seller, it stays on the login page.
When I enter the credentials for a registered Buyer, it stays on the login page.

#920343

Noticed a new face in the thread. Is anyone still assigned to helping get through this issue? It's been 4 days now waiting on a response to my last. We still need help on this. Resolving it is central to having a fully functioning live site. Thanks.

#920512

Shane
Supporter

Languages: English (English )

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

Hi Michael,

As Christian is currently on Vacation. I'll be handling his queue.

I took a quick read of the thread so far. It seems that you want to redirect users based on their roles to different pages when they logged in.

I see where christian has provided some custom code that would get this working for you. Could you update me if this code is working for you or not ?

Thanks,
Shane

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.