filter login_redirect
:
function my_login_redirect_contributors() {
if ( current_user_can('contributor') ){
return 'url-to-redirect-to';
}
}
add_filter('login_redirect', 'my_login_redirect_contributors');
Related Posts:
- Masking logout URL
- redirect wp-login.php to another page
- wordpress custom login successful redirect hook
- Login Redirect if Logged in from Specific Page
- Logout Redirect and also WP-login.php Redirect
- How to add array [closed]
- How to redirect Subscribers on login to specific page, when logging in from a Page
- How to request login for user but not for bots
- wp_enqueue_script was called incorrectly
- Apply custom role capabilities to administrator (without plugin)
- Logout/login redirect CSS issue
- Is it possible to use a forgot password url filter?
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- after login that will redirect user role into a page
- Login using the password from protected pages
- Logging in redirects to correct page but shows logged out content until forced refresh
- How to add another user to this remove_menu function?
- Add a new subscriber role using a function
- How to test for Super Admin
- Remove default user registration, login and subscriber profiles
- Custom roles can’t access to wp-admin
- Custom registration URL lost when user makes signup mistake
- is_user_logged_in not working to redirect only logged out users
- Hide Author.php template from specific user role
- edit role display name and label name without plugins
- Ninja form Redirect depending on text field content [closed]
- Redirect specific page in WordPress for first time visit
- How do I redirect all 404 error url to Subcategory url
- How to change login labels
- create shortcode to list users with specific meta key value
- Toggle User Roles with button
- How to change or add user role after getting post request data about pay? [closed]
- How can I get my Script to work on the Login page?
- Execute a ultimate member action when user role is updated
- 404 redirect to previous category
- Unable to login using username
- When a user logs in, how can they view the website instead of the admin menu?
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- WordPress PHP Conflicting User Sessions
- Allowing users to view private posts (pending approval)
- Get User Login Data (date, time… )
- Incorrect redirect after commenting
- Registration Hooks don’t appear to be working
- Allow Contributor to edit their own posts after Adm aproval
- How to add custom JavaScript in functions?
- If user is logged-in display/hide something
- Page get parameter doesn’t work with is_single() function
- Secondary Menu and Logged In Users
- load CSS only for administrators on backend
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- Adding additional roles on registration
- Contact Form 7 If Condition
- Prevent WordPress Automatic Logout
- error at login page in wordpress
- Solved: redirect to another page using functions.php
- Redirect to other page if login
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- WordPress website keeps loading the maintenance page
- Redirects based on a JSON file
- loginout function customization
- Get users with different roles and call function on each of them (user_meta)
- Add Login and logout buttons to top menu bar
- Show errormessages on wrong username/password on custom loginform?
- How can I show different content for different user-levels?
- WordPress login set cookie that survive browser exit (wp_signon function)
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- Prevent wp_signon redirect on failed login for ajax login
- How to load a css file depending on the current role
- Redirect to one of two pages after data submitted, depending on the current url
- How to replace ACTION url from original wordpress login form?
- Remove check boxes and its label from screen option for custom role
- Unable to login after registration
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- How to show only specific category post by user role without plugin and restrict all other cats
- Wildcard 301 Redirect Using Theme Function
- Competing Login Redirects – Need to be Combined?
- Postback redirect through add_action is not triggered
- Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
- Restrict access if logged out except for homepage
- Change user role based on total number of items ordered
- Redirect specific author posts to another url
- Remove all video attachment, both files and post/postmeta from database?
- delete_user_meta for user in spesific group
- Custom download page
- Conditional redirect on login using referring URL
- Change the second role depending on the first
- Redirect after login to current URL
- Restrict certain roles registrations by domain
- How to create a function to redirect a specified page to another page
- Multisite Admin Roles
- Login functions
- Language switcher for subdomains
- add_role menu pages are not visible
- Allow the access over wp-login.php
- is_user_logged_in() isn’t working
- update_user_option not working as expected
- “Headers already sent” while trying to add a CSS file to my login page?
- Making an under maintenance page (without using plugins)
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Template Redirect Function Only Working When Logged In