WordPress.org

Ready to get started?Download WordPress

Forums

go to main page after logging in (not dashboard) (5 posts)

  1. jrizos
    Member
    Posted 8 years ago #

    How can I change the page my users go to after logging in, from the dashboard to the main page?

  2. iwanknapen
    Member
    Posted 8 years ago #

    I don't think your users ever go to dashboard. That's only for you as admin.

  3. jrizos
    Member
    Posted 8 years ago #

    They do, but I found the fix!

    Round about line 170 in your wp-login.php file, you will see this:

    $redirect_to = 'wp-admin/';

    Change that bad boy to this:

    $redirect_to = 'index.php/';

    Should work ya fine.

    http://wordpress.org/support/topic/72039?replies=3

  4. underhj
    Member
    Posted 7 years ago #

    WordPress 2.1.1

    I wanted logged in users to avoid Dashboard and go to Write Post.

    Line 290 rem it out and insert new redirect to wherever:

    $redirect_to = 'wp-admin/post-new.php';
    // $redirect_to = 'wp-admin/';

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    A somewhat nicer way (no core editing):

    function change_login_redirect()
    {
    global $redirect_to;
    if ($redirect_to == 'wp_admin/') {
    $redirect_to = 'whatever_you_want.php';
    }
    }
    add_action('login_form','change_login_redirect');

    Stick that in your theme's functions.php file or in a plugin or what have you, and voila.

Topic Closed

This topic has been closed to new replies.

About this Topic