This topic has 7 replies, 2 voices, and was last updated 2 years, 6 months ago ago by moodi2727
Hello there
1st of all, i am sorry for all that requests and complains… but i am not familiar with your theme …
Dears, i want to change the redirection Url when press on ((Account)) buttom to courses dashboard. not to woocommerce dashboard.
can anyone guide me how to do that ?
regards.
Hello,
Thanks for using our theme.
Do you mean you want to change the link of this icon in the header – https://prnt.sc/JiL0obNht0WI or links of this menu https://prnt.sc/R2s9k7Y_sgJh ?
Regards
yes dears, i want to change the link of this icon in the header
Hello
Would you like to have next result https://prnt.sc/xMvWLogJSgWT ?
If so then you may add next code to your child-theme/functions.php
or you may install any Code Snippets plugin and add the code to their php code areas.
Code:
add_filter('header_account_link', function($url) {
return get_dashboard_url();
});
Backend: https://prnt.sc/AsSFjFmRbeOG
If you would like to have another result, please, provide us more details with screenshots or example urls for logged In and unlogged In users.
Regards
hello there
thank you so much … code works fine and redirected to wordpress dashboard.
but i need it to be redirected to courses dashboard 🙂
here the URL for the courses dashboard :
Hello,
if you want to hardcode redirect to another url different from your origin web-site then you may use next snippet
add_filter('header_account_link', function($url) {
return "https://tomoo7.com/dashboard/";
});
Otherwise if you want to redirect to ‘dashboard’ but on your web-site then
add_filter('header_account_link', function($url) {
return home_url('/dashboard/');
});
WordPress documentation: https://developer.wordpress.org/reference/functions/home_url/
Regards
Thank You So Much … it works fine
Regards
Tagged: account, change, header, redirection, themes, woocommerce, wordpress
The issue related to '‘how can i change account redirection on Header ?’' has been successfully resolved, and the topic is now closed for further responses