Hi friends, I know its not an exactly Thematic topic, but like thematic functions with filters, I think I can find help here, and the topic could be interesting for everybody...
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 = 'http://www.myweb.com.br/wp-admin/post-new.php?post_type=artigo';
}
add_filter('login_redirect', 'admin_default_page');
Any help ???
Thanks!