WordPress.org

Ready to get started?Download WordPress

Forums

Regarding login redirect urls (4 posts)

  1. zee000
    Member
    Posted 3 years ago #

    Hello guys,

    I am building an word press site , which contains login feature . if the user logins into the site the site is redirecting by default to the admin panel how can i change that settings where can i find that reply me as soon as possible.

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    http://wordpress.org/extend/plugins/peters-login-redirect/
    is an excellent plugin for that

    or, depending on how you're doing your login you can code it...

    //ADD LOGIN LINK TO MENU
    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    
    function add_login_logout_link($items, $args) {
    	$voodooredir = htmlspecialchars($_SERVER['REQUEST_URI']);
    	$loginoutlink = wp_loginout($voodooredir, false);
    	$items .= '<li>'. $loginoutlink .'</li>';
    	return $items;
    }

    I use this to put a login in my menu, which redirects to whatever page the user logged in from

  3. Ursula (aka WP Gal)
    Member
    Posted 3 years ago #

    I second that - the Peter's Login Redirect plugin is what I've used in the past, and works extremely well - very flexible and easy to use!

  4. GRAQ
    Member
    Posted 3 years ago #

    If you just want to build a login url that redirects to a specific page after successful login:
    http://codex.wordpress.org/Function_Reference/wp_login_url

    Or if you want to play with action hooks on login:
    http://codex.wordpress.org/Plugin_API/Action_Reference/wp_login

Topic Closed

This topic has been closed to new replies.

About this Topic