The function should be added to wp-content/themes/kleo-child/functions.php
COPY CODE
function kleo_bp_replace_placeholders_extra( $output, $initial_output ) {
if ( strpos( $output, '##username##' ) !== false ) {
if ( ! is_user_logged_in() ) {
return '';
}
$current_user = wp_get_current_user();
$username = $current_user->user_login;
$output = str_replace('##username##', $username, $output);
}
return $output;
}
add_filter('walker_nav_menu_start_el', 'kleo_bp_replace_placeholders_extra');
NOTE : Kleo Child theme needs to be installed and activated.