A lot of users have asked us how can they rename the ‘LearnDash LMS’ text from the instructor dashboard to insert their own branding to the menu.
You can easily replace the text by adding the below code in either of the two options:
- functions.php file of child theme
- Code snippets plugin
<?php
/**
* Change dashboard label for Learndash LMS menu.
*/
function irUpdateLearndashLabel()
{
global $menu;
foreach ($menu as $key => $menu_item ) {
// Compare menu item slug with learndash slug
if ('learndash-lms' === $menu_item[2]) {
// Update label to whatever required.
$menu[$key][0] = 'LearnDash';
}
}
}
add_action('admin_menu', 'irUpdateLearndashLabel');
?>
You can add the text that you want instead of ‘Learndash LMS’ in this line of the above code.
$menu[$key][0] = 'LearnDash';