Created
December 28, 2015 02:36
-
-
Save nathaningram/ad6b35298e192d9a261c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // First Name of Logged In User Shortcode | |
| function ni_firstname() { | |
| $user = wp_get_current_user(); | |
| $firstname = $user->user_firstname; | |
| return $firstname; | |
| } | |
| add_shortcode('firstname', 'ni_firstname'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment