Skip Navigation

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

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 2.03 hours from now. Thank you for your understanding.

This topic contains 19 réponses, has 3 voix.

Last updated by Shane Il y a 3 années et 3 mois.

Assigned support staff: Shane.

Auteur
Publications
#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: Anglais (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

Le sujet ‘[Fermé] Need to have 1 login form that redirects based on WP_user-role’ est fermé à de nouvelles réponses.