InspireDesign
Member
Posted 6 months ago #
Hi, hopefully somebody will be able to help,
I have set up a front end registration, login, author profile system on my website ( not live yet ), and I want users to be redirected when they log in, is there any code you can suggest that will sort this?
thanks in advance...
There are several redirect plugins available. I use Peter's Login Redirect on several sites.
If you don't want to use a plugin, here is some sample code for simple redirects. Place it in your theme's functions.php file:
function plugin_admin_redirect($redirect_to, $url_redirect_to = '', $user = null) {
// return home_url('/wp-admin/'); // to Dashboard
return home_url(); // to Home page
}
add_filter('login_redirect', 'plugin_admin_redirect');