Hello @ravizsoft!
solution : in this file path plugins/tutor/templates/dashboard.php, 183 no line
need to remove echo before this line $menu_link = $dashboard_page[‘url’];
Thank you!
Sorry i can’t find in 183 line
// Add new menu item property “url” for custom link
if (isset($dashboard_page[‘url’])) {
$menu_link = $dashboard_page[‘url’]; }
Hello @ravizsoft
Remove the first code and Use this demo code.
add_filter('tutor_dashboard/nav_items', 'add_some_links_dashboard');
function add_some_links_dashboard($links){
$links['custom_link'] = [
"title" => __('Custom Link', 'tutor'),
"icon" => "tutor-icon-calender-line",
];
return $links;
}
i tried this code, but i want to add third party URL.
This will redirect within the dashboard page
Hello @ravizsoft
add_filter('tutor_dashboard/nav_items', 'add_some_links_dashboard');
function add_some_links_dashboard($links){
$links['custom_link'] = [
"title" => __('Custom Link', 'tutor'),
'url' => 'custom URL'
"icon" => "tutor-icon-calender-line",
];
return $links;
}
I have added the above code, if i add url parameter, this will shown above the menu title
i have shared the screenshot please check,
https://prnt.sc/cBNr9ArqT8DP
Hello @ravizsoft
Little changes previous code has little comma mistake use this code.
add_filter('tutor_dashboard/nav_items', 'add_some_links_dashboard');
function add_some_links_dashboard($links){
$links['custom_link'] = [
"title" => __('Custom Link', 'tutor'),
"url" => "//youtube.com",
"icon" => "tutor-icon-calender-line",
];
return $links;
}
I just copied and pasted your code, same issue still url is visible
https://prnt.sc/3IFKKpRFWlff
Hello @ravizsoft
Update your template file from your theme. Check this link for that https://docs.themeum.com/tutor-lms/developers/override-templates/
If i add the plugin templates folder to child theme, the samething will repeat. Basically i’m using twenty twenty two theme.
Documentation says that you can modify the templates if i add templates folder within the child theme. What do i modify
Mine concern is simple, it’s showing url of the custom menu above the menu title when i visit the dashbord page
check this screenshot, https://prnt.sc/cBNr9ArqT8DP
Hello @ravizsoft
Do one thing send an email here support at themeum dot com. we will access your site and check why the URL is not working and it’s coming as text cause On our site it’s working as a custom link no problem found as you mentioned.