Support » Plugins » Hacks » WP Filter: login_redirect

  • Hi friends,

    I trying to change the default admin page… I mean, when somebody makes a login, by default he is redirected to Dashboard or profile.php… I want to change it.

    I found on the wp-login.php on line 536 (wp version 3.0.1) a filter called login_redirect that I think is the place to touch to change it. But I´m not doing it well.

    The code there is:

    $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);

    I whote it on my functions.php:

    function admin_default_page() {
      $redirect_to = '';

    add_filter(‘login_redirect’, ‘admin_default_page’);

    Any help ???

Viewing 1 replies (of 1 total)
  • Try:

    function admin_default_page() {
      return '';
    add_filter('login_redirect', 'admin_default_page');
Viewing 1 replies (of 1 total)
  • The topic ‘WP Filter: login_redirect’ is closed to new replies.