• i can’t seem to get redirect after login to work…it stays at the login page…so what’s the majik inkantation?

    my login page contains these shortcodes:

    [wpmem_form login]You are logged in as [wpmem_field field=user_login]
    [wpmem_profile]
    [wpmem_logout] - Log out[/wpmem_logout]
    [/wpmem_form]
    [wpmem_logged_out][wpmem_form forgot_username][/wpmem_logged_out]
    • This topic was modified 6 years, 3 months ago by airdrummer.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter airdrummer

    (@airdrummer)

    perhaps the shortcode nesting fubducks?

    Plugin Author Chad Butler

    (@cbutlerjr)

    If you want the login form that you are invoking with the shortcode to redirect, use the redirect_to attribute in the shortcode:

    [wpmem_form login redirect_to=”http://example.com/page/”%5D

    If you want all logins to redirect (and/or you want to customize further), use the wpmem_login_redirect filter:
    https://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_login_redirect/

    Plugin Author Chad Butler

    (@cbutlerjr)

    Looking at the question also posted here, the answer to your question may actually be a little different. If you’re using the wpmem_redirect_to_login() function to get to the login page, the redirect_to parameter will be populated in the login form automatically. Looking at the form at the link you posted above, that appears to be the case, so it should be redirecting upon successful login. I tested this locally with the set of shortcodes you are using and that works.

    Thread Starter airdrummer

    (@airdrummer)

    sorry, i didn’t make myself clear: i have a page
    https://cardinalglen.org/event/annual-meeting-2018/
    that contains the link to the login page
    https://cardinalglen.org/login/?redirect_to=/event/annual-meeting-2018
    and i want to return to the event page after login using the parameter in the url, not wpmem_redirect_to_login() or embedding a login form shortcode in my calling page…or isn’t that possible?

    Thread Starter airdrummer

    (@airdrummer)

    i had hoped to use wp-member login, but i’ve worked-around by going directly to wp-login.php instead
    https://cardinalglen.org/wp-login.php?redirect_to=https://cardinalglen.org/event/annual-meeting-2018

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘redirect after login not working’ is closed to new replies.