addition user meta field

Question

I would like addition meta field

Example

first_name + last_name

User first_name = 2
User last_name = 3

of course I will not do it with first_name and last_name but with other specific fields, it’s just to test shortcode
My shortcode don’t work result 0 …

add_shortcode( 'test_addition', 'func_test_addition' );
function func_test_addition( $atts, $content ) {
   if ( is_user_logged_in() ) {
       $current_user = wp_get_current_user();
            $first_name = $user_info->first_name;
      $last_name = $user_info->last_name;
   $toto = $first_name+$last_name ; 

return $toto; 


}
 
   return ;
}

THX

0
Olivier 8 months 2020-11-30T01:10:35-05:00 0 Answers 15 views 0

Leave an answer

Browse
Browse