1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WP Login

Discussion in 'Blogging' started by iamsgf, Nov 21, 2008.

  1. iamsgf

    iamsgf Regular Member

    Joined:
    Oct 6, 2008
    Messages:
    307
    Likes Received:
    268
    Hi All,

    I am trying to play with the way my login structure works in WP. Currently when a User logs in it takes them to WP-ADMIN. Is there a way that I can direct users to a different page on login?

    Thanks if you can help :)
     
  2. istarapol

    istarapol Junior Member

    Joined:
    Jun 3, 2008
    Messages:
    110
    Likes Received:
    228
    Occupation:
    Graphic Designer
    Location:
    Under Your Bed
    Home Page:
    look into wp-login.php and check lines 430 ^
    If the user can't edit posts, send them to their profile.

    Code:
    		if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
    try replacing 'wp-admin/' with the url you want to pass to the user. Im not sure if it would work because wordpress before line 430 passes on filters to check the user's action, username and password. If you can code php and get around this, you're sure in luck.

    :)
     
  3. iamsgf

    iamsgf Regular Member

    Joined:
    Oct 6, 2008
    Messages:
    307
    Likes Received:
    268
    nope tried that one before and could not get it to work :(

    But thanks