Skip dashboard when log into WordPress
If you are like most of my clients, don’t want to do an extra click after logging into WordPress. This tip is for you. Put this snippet in functions.php:
function my_login_redirect( $redirect_to, $url, $user ) {
if ( ! is_wp_error( $user ) && user_can( $user, 'edit_posts' ) ) {
$redirect_to = admin_url( 'edit.php' );
}
return $redirect_to;
}
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );Written by 1Fix.io
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Wordpress
Authors
Related Tags
#wordpress
Did you know?
WordPress sites collect scripts from themes, plugins, and tag managers. A compromised plugin update can add a skimmer to every page without a change in your own templates.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#