Display logged in user name and lastname on page

You can always do a var_dump() of $current_user to see what it contains. You’ll see there is a similar property to user_firstname: user_lastname. You’ll probably want a space between the first and last name, so a small edit should add the last name: function custom_shortcode_func() { ob_start(); $current_user = wp_get_current_user(); echo ‘Willkommen ‘ . $current_user->user_firstname … Read more

How to remove double quotes in a shortcode?

do a print_r to your $a variable, there you see everything that is happening echo ‘<pre>’; print_r($a); echo ‘</pre>’; die(); this way you can see if the url variable has double quotes, because it seems it doesnt have.