Custom login redirect
-
How can I do a custom redirect after login to a page that is not the home page and not the admin page? I have tried using this…
<?php /* Plugin Name: Redirect user to front page Plugin URI: https://www.theblog.ca/wplogin-front-page Description: When a user logs in via wp-login directly, redirect them to the front page. Author: Peter Version: 1.0 Author URI: https://www.theblog.ca */ 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'); ?>
but I cant change the siteurl to something like newdash.html or newdash.php, it gives me a blank page. I need to use this to send a user to a “more user friendly” dashboard (its what they want so I cant get around it) how can i do this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom login redirect’ is closed to new replies.