Support » Plugin: WP-Members: Membership Framework » Login Page Redirect

Viewing 3 replies - 1 through 3 (of 3 total)
  • I was able to resolve the issue from Chad’s previous post using,

    add_filter( ‘wpmem_login_redirect’, ‘my_login_redirect’ );

    function my_login_redirect()
    // return the url that the login should redirect to
    return ‘’;

    But now I want the link
    always redirected to
    when a member is already logged in.

    Plugin Author Chad Butler


    You could use a combination of is_page(‘login’) and is_user_logged_in. If both return true, redirect.

    if( is_page( 'login' ) && is_user_logged_in() ) {
      wp_redirect( '' );

    You could work that in in a number of ways; the easiest probably being directly in the page template. But with redirection being part of that process, you should probably put it into a hook that occurs before headers are sent, such as ‘init’

    Wow…..Thanks man. Worked like a charm. I appreciate it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Login Page Redirect’ is closed to new replies.