Redirect After Login Problem
-
Hello,
When I log in to site https://www.trustchem.eu/beheer/ I want to redirect to home page
For this I used this codefunction login_redirect() { $redirect_url = $_SERVER['HTTP_REFERER']; $redirect_url = str_replace("/beheer","",$redirect_url); wp_redirect($redirect_url); } add_action('wp_login', 'login_redirect');
All working for administrator user. But when login as contributor instead of home page WP redirects to profile page
https://www.trustchem.eu/wp-admin/profile.php
Not clear why this happens. Can somebody help me to figure out what is problem ?
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Redirect After Login Problem’ is closed to new replies.