There seems to be a lot of outdated code out there from WordPress 2.x days on how to redirect a user to any page of your choosing after logging in, the below code will redirect a user to the homepage directly after logging in without taking them to the usual admin panel (in-case you have a custom page you want users to see).
This post is more of a self-reference for future projects, but thought I would share.
Put the following at the end of your theme’s function.php file right before the closing ?>
function redirect_to_front_page() {
global $redirect_to;
if (!isset($_GET[‘redirect_to’])) {
$redirect_to = get_option(‘siteurl’);
}
}
add_action(‘login_form’, ‘redirect_to_front_page’);