Support » Fixing WordPress » Code or plugin to redirect user to front page after login?

  • Hi,

    Is there a way to redirect the user to the front page after logging in instead of the profile (backend) page like all CMS do?

    Thanks,
    Gene

Viewing 7 replies - 1 through 7 (of 7 total)
  • whooami

    (@whooami)

    Member

    I do it, but I dont use a plugin — I hacked the core.

    Hi Who,

    Care to share the secret, irritates the heck out of my users to be directed to their profile then having to click on “Visit Site”…

    Thanks,
    Gene

    whooami

    (@whooami)

    Member

    what version of wp are you using?

    whooami

    (@whooami)

    Member

    if youre using 2.5 look inside wp-login.php:

    case 'login' :
    default:
    	if ( isset( $_REQUEST['redirect_to'] ) )
    		$redirect_to = $_REQUEST['redirect_to'];
    	else
    		$redirect_to = 'wp-admin/';

    thats the bits that does it.

    Thanks,

    I’m using 2.5, so it would be the link below that I would have to change?

    else
    $redirect_to = ‘wp-admin/’;

    ‘wp-admin/’ to ‘BlogName/’ ?

    Thanks,
    Gene

    Thanks Woo, it works…

    I did ‘wp-admin/’ to ‘/BlogName’ (forward slash before the blog name).

    Cheers,
    Gene

    Works OK but now I have to find a way for when the registered user (subscriber) to go directly to his profile page when he clicks on the Site Admin link.

    Don’t take me wrong, I really like WP but some basic features are lacking compared to some forum/CMS/blog systems I tested.

    Most software will either change the Site Admin link to Profile for basic membership or have separate links for Profile and one for Admin.

    Cheers,
    Gene

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Code or plugin to redirect user to front page after login?’ is closed to new replies.