Skip Navigation

[Resolved] Conditional output redirection when users logged in

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

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 6 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#620683

Hello, I am trying to redirect to two different pages when a user logged in. I am using Cred front-end submission steps form that allows users to submit Ads. that means as long as users complete the first step, the posts will be created. so I would like to set when that user wants to log in his account, if the form is incomplete, just redirect to the submission form, and if completed, and then just come into account. I know I can set a view to check if the post status is draft, pending or publish. and the logged-in user is same as the author, and how many posts were queried, if pending or publish posts are greater than 1, direct to account page, if less than 1, redirect to form submission page, how I can set it with login form shortcode? Thank you so much!

#620795

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you need to use standard WordPress hook login_redirect in order to manage your redirection after login.

More info:
https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect