Support » Fixing WordPress » After LOGIN, DO NOT want to be taken to teh DASHBOARD

  • After a user logs in (Default WP login screen) he/she is taken to the DASHBOARD. Most users do not want to go to a DASHBOARD, they prefer to go directly to the “Visit Site” DEFAULT … the plain ole index..
    Same place you would be taken if you typed http://www.yourwebsite/blog/

    Where can I go to change that ????

    Steve
    Perdido Beach, Alabama

Viewing 3 replies - 1 through 3 (of 3 total)
  • Steve,
    In your current theme’s functions.php file, please add the following lives of code anywhere:

    add_filter( 'login_redirect', 'mf_redirect_login' );
    function mf_redirect_login( $c ) {
    	return get_bloginfo( 'url' );
    }

    mfields, many thanks for the code…but …
    what will this do, where will a user logging in be taken and do I have to add any parameters ?

    Many Thanks,

    Steve

    Perdido Beach, AL

    Steve, it will do exactly what you asked for… after a user has loged into your site, they will be redirected to the front page of your WordPress installation. You can edit the function to send them where ever you want, just change this line:

    Your blog’s Front Page:

    return get_bloginfo( 'url' );

    or, A url of your choice:

    return 'http://example.com/';

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After LOGIN, DO NOT want to be taken to teh DASHBOARD’ is closed to new replies.