AI Verified
Shortcode for user first and last name
Display current user display name with shortcode
PHP
Voted: 0 by 0 user(s)
User_fields : user_login user_email user_firstname user_lastname display_name # In template echo do_shortcode( '[current_user_data metakey="nickname"]' ); echo do_shortcode( '[current_user_data user_field="user_email"]' ); #in content [current_user_data metakey="first_name"] [current_user_data user_field="user_email"]
Scroll down to see more snippets from this codevault.
The author has indicated that this snippet is compatable up to wordpress version: 6.1
Our AI bot has checked this snippet is compatable up to wordpress version: 6.1
Free & Pro
Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.
Pro Only (Coming Soon)
You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.
Last modified:
16/06/2023
This snippet has the following status:
AI Verified
This snippet has been tested by our AI bot, see any comments below.
AI Bot Comments:
Potential vulnerability found : Cross Site Scripting
Found on line : 15
Code : echo($value)
Vulnerable line : 15
Code : $value = get_user_meta( $c_user_id, $metakey, true));
Found 1 vulnerabilities
0
Please see some snippets below related to this snippet..
General
AI Verified
General
AI Verified
General
Unverified
Added: 6 days ago
Last Updated: 22 hours ago
This WordPress code snippet automatically converts uploaded images (JPEG, PNG, GIF) to WebP format during the upload process.
These are some popular snippets from this users codevault..
General
AI Verified
Added: 1 year ago
Last Updated: 1 year ago
Display current user display name with shortcode
Category
Snippet Status