[current_user_display_name]

PHOTO EMBED

Fri Jul 14 2023 12:24:38 GMT+0000 (Coordinated Universal Time)

Saved by @Roelinde #php

// [current_user_display_name]
function display_current_user_display_name () {
    $user = wp_get_current_user();
    $display_name = $user->display_name;
    return $user->display_name;
}
add_shortcode('current_user_display_name', 'display_current_user_display_name');
content_copyCOPY

https://stackoverflow.com/questions/62786231/how-can-we-display-current-user-display-name-with-shortcode