• Resolved Tom Lany

    (@tomthewebmaster)


    I would like to have the ability to forward users (especially subscribers) dirrectly to my blog home page after login. I am sure that some of the subscibers want to simply view the site, and seeing a dashboard may confuse them.

    I appologize if a thread on this topic has already been created. I could not find one. Thank you in advance for your assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • impelus

    (@impelus)

    I just did this myself because I was annoyed with having to explain to people how to view the site and it was taking too many steps. There might be a plugin or some easier way to do this, but I simply edited the wp-login.php (the login screen).

    The wp-login.php is located in the base directory of your WordPress installation.

    Look for the $redirect_to tags. There are several in there for different reasons, but the part of code I changed was.

    $user_login = '';
    $user_pass = '';
    $using_cookie = false;
    if ( !isset( $_REQUEST['redirect_to'] ) )

    $redirect_to = ‘/wp-admin’;
    else
    $redirect_to = $_REQUEST['redirect_to'];
    $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $redirect_to);

    change the /wp-admin to just /

    impelus

    (@impelus)

    Thread Starter Tom Lany

    (@tomthewebmaster)

    Thanks everyone!! I got it to work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Forward Users Directly to Site After Login’ is closed to new replies.