WordPress.org

Ready to get started?Download WordPress

Forums

After LOGIN, DO NOT want to be taken to teh DASHBOARD (4 posts)

  1. steverf
    Member
    Posted 5 years ago #

    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

  2. Michael Fields
    Themer
    Posted 5 years ago #

    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' );
    }
  3. steverf
    Member
    Posted 5 years ago #

    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

  4. Michael Fields
    Themer
    Posted 5 years ago #

    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/';

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags