• We are using our blog as somewhat of a file management tool where visitors can register and then download files. Because of this, we do not want them landing on the WP Dashboard or Profile page once they login.

    Is there a plugin or simple hack that can direct users to a specified page, or even the home page, after logging in?

    Thanks!

    – Joel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yeah, good question, I would like to use that trick too. Any ideas? Anyone?

    it’s all here: https://blog.koloda.pl/wordpress-panel-logowania.html
    in case you don’t know Polish, here is what you have to do:

    open wp-login.php and find the line with “case ‘login’ :” below that you have a code executed when someone tries to log in. You have to look for something like:

    if ( !isset( $_REQUEST[‘redirect_to’] ) )
    $redirect_to = ‘wp-admin/’;
    else
    $redirect_to = $_REQUEST[‘redirect_to’];

    and change it to:

    if ( !isset( $_REQUEST[‘redirect_to’] ) || empty( $_REQUEST[‘redirect_to’] ) )
    $redirect_to = get_settings(‘siteurl’).’/’;
    else
    $redirect_to = rawurldecode( $_REQUEST[‘redirect_to’] );

    Check if users who have permission to add/edit posts are also redirected to proper side. If not you have to comment the line:

    /* if ( !$user->has_cap(‘edit_posts’) && ( empty( $redirect_to ) || $redirect_to == ‘wp-admin/’ ) )
    $redirect_to = get_option(‘siteurl’) . ‘/wp-admin/profile.php’; */

    It may be a bit differed in wordress 2.6, but I guess you will have to use your brain and find similarities.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirecting logged in users to a page other than dashboard/profile?’ is closed to new replies.