Redirect after Login on WordPress
This should solve your problem. Adapted from an answer found here.
Add the following snippet of code in the functions.php file of your theme:
function admin_default_page() {
return '/new-dashboard-url';
}
add_filter('login_redirect', 'admin_default_page');
Redirect to page after login, when you came from specific page in wordpress
If you want custom redirection, you can use like this
$returnPath = get_settings('siteurl') . '/login/?redirect_to=' . urlencode($_SERVER['REQUEST_URI']);
<a href="<?php echo $returnPath;?>">Login link</a>
WordPress redirect specific user after login
If you are sure about permission, remove last slash and try again.
return home_url("/wp-admin/edit.php?post_type=shop_order");
Related Topics
Why Do I Have to Run "Composer Dump-Autoload" Command to Make Migrations Work in Laravel
How to Force Laravel Project to Use Https for All Routes
Wamp/MySQL Errors Not in Correct Language
Executing a PHP Script with a Cron Job
Fatal Error: Call to Undefined Function Socket_Create()
How to Pass Parameters by Reference Using Call_User_Func_Array()
Generate Cryptographically Secure Random Numbers in PHP
Bind_Param Number of Variables Doesn't Match Number of Parameters in Prepared Statement
How to Remove Attributes from an HTML Tag
How to Make a Bbcode to Parse Url Tags into Links
Getting the First Character of a String with $Str[0]
How to Send 500 Internal Server Error Error from a PHP Script
How to Get Final Url After Following Http Redirections in Pure PHP
MySQL Performance - "In" Clause VS. Equals (=) for a Single Value
PHP Serial Port Data Return from Arduino
Php.Exe' Is Not Recognized as an Internal or External Command, Operable Program or Batch File