• Hello, I set up a login redirect for Subscribers to view a specific page upon logging in using your plug-in. It works great upon initial log-in but if the Subscriber logs out, then logs back in, they see the WP-Admin. I’ve tried disabling other plugins and I’m not sure what’s causing this issue.

    In my testing, this is what happens.

    First login: goes to designated page. Click logout button.
    Second login (logging back in): goes to WP-Admin, not sure why. Log-out.
    Third login: sometimes goes to WP-Admin other times goes to designated page.

    I’ve visited your website and looked here in the Support docs and haven’t found a similar thread with a solution, and I would like to know what I’m doing wrong.
    BTW, I did not set parameters for other users – could this be causing issues for the Subscriber setting?

    Thanks for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Can I see a screenshot of your setup?

    Thread Starter waving11

    (@waving11)

    Hi Collins,

    Thanks for your reply, here’s a link to a screenshot of how I’ve set up your plugin: https://www.dropbox.com/s/0m5ayawwr2319lb/screenshot-setup1.jpg?dl=0.

    Please let me know what else you’d need to see and whether I would be able to message you privately.

    Thank you!

    Really can’t tell why it works sometimes and it doesn’t other times.

    Maybe it’s a cache issue or a conflict with another plugin. You can resolve a plugin conflict by deactivating all plugins and then test then reactivate one at a time to find the culprit.

    Thread Starter waving11

    (@waving11)

    OK, I re-read the notes in the plugin code (and didn’t change the plugin code): “Login redirects not working? This plugin uses WordPress’s standard login_redirect hook. The usual cause of problems is that another plugin is using the hook first, or there is a custom login form that isn’t even running through the standard WordPress login functions.”

    On my site, I have to use a different log-in page with a copy of the WP login form code and submit button. This is for guests, it’s a login/signup page with a registration form on the same page (it’s a two-column layout with the registration form on one side and the login page on the other side). When they log out, they go back to this same log-in/signup page. In addition to that, I have to use a login-page name changer plugin so the login page doesn’t say “https://www.websitename.com/wp-login” – the name is changed to something else.

    I tried disabling all the plugins but nothing changed.

    When I tried logging in as a subscriber using the regular WP-admin login form, it worked, sort of: I logged in, and got redirected to the page that I was supposed to see. I logged out and got sent back to the registration/signup page I made. To test, I typed in the URL for the regular wp-admin login and was sent without having to log in to the wp-admin. I shouldn’t have still been logged in at that point. I logged out, tried it again with the regular wp-admin login form and was sent to the page I was supposed to see.

    Does the problem have something to do with not using the regular wp-admin login form, and improper cookie retention?

    Like you alluded, the problem has to do with not using the regular wp-admin login form.

    Curious, what plugin are you using for the various login forms on your site or how are the login forms created?

    Thread Starter waving11

    (@waving11)

    I took the code from the original login form and added it to another page after creating an html snippet/shortcode so that it would fit into a 2-column format on the same page with the signup/registration form.

    From the original login form? Can I see the code you are using?

    Also can you send me a link to your login page let me see.

    Thread Starter waving11

    (@waving11)

    I’d be glad to show you via PM but would rather not post publicly.

    Send me an email via support at profilepress dot net

    Thread Starter waving11

    (@waving11)

    OK, thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Redirect works on first login but not when logging in a second time’ is closed to new replies.