Title: Current user shortcode
Last modified: August 13, 2021

---

# Current user shortcode

 *  Resolved [mariwnm](https://wordpress.org/support/users/mariwnm/)
 * (@mariwnm)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/)
 * I have a custom post type Flower on my website. Users can create new Flowers 
   and/or upload photos for a given flower that are reviewed by an editor. I’d like
   the notification message that the editor receives to identify who uploaded a 
   photo (Flower Updated). I thought that [display_name] would do that, but instead
   I get the display name of the person who created the Flower. Is a custom shortcode
   the only way to get this info into the notification? If so, please expand on 
   the stub provided in the documentation. Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14765601)
 * Hi [@mariwnm](https://wordpress.org/support/users/mariwnm/),
    Thanks for your
   message.
 * You can use any of the `user_` or `email_user` shortcodes mentioned in the documentation.
   This should give you the information you’re looking for.
 * Let me know how you get on.
 *  Thread Starter [mariwnm](https://wordpress.org/support/users/mariwnm/)
 * (@mariwnm)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14765823)
 * The user codes (display_name, user_firstname, user_lastname) are giving me the
   info for the original author, not for the current user making the change.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14771003)
 * Hi [@mariwnm](https://wordpress.org/support/users/mariwnm/),
    So you’re looking
   for details of who the email is going to, rather than the author of the original
   post, is that correct?
 * If so, can you try the `email_user_` shortcodes instead?
 *  Thread Starter [mariwnm](https://wordpress.org/support/users/mariwnm/)
 * (@mariwnm)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14772268)
 * No, that’s not correct. I have two different “authors”, (1) the person who posted
   the flower, and (2) the person who added a flower photo (an update). I just need
   a shortcode for the display name of the “current user” who triggered an update
   notification. Right now, all of your “user” shortcodes come back with data on
   the person who posted the flower, not the current user.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14774931)
 * Hi [@mariwnm](https://wordpress.org/support/users/mariwnm/),
    Ok, I understand
   now.
 * Have you tried `[post_update_author]`?
 *  Thread Starter [mariwnm](https://wordpress.org/support/users/mariwnm/)
 * (@mariwnm)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14782072)
 * I don’t get any user’s name from [post_update_author]. (I modified a name field
   for one of the flowers instead of a photo this time.) Please check your code.
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14782873)
 * Hi [@mariwnm](https://wordpress.org/support/users/mariwnm/),
    Did you try the`
   email_user_` shortcodes instead? These are different to the `user_` shortcodes.
 *  Thread Starter [mariwnm](https://wordpress.org/support/users/mariwnm/)
 * (@mariwnm)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14792988)
 * None of your suggestions worked for me. What did work is creating three notifications:(
   1) post added (Flower), (2) post updated (Flower) and (3) new media published(
   a flower photo). The current user I was looking for is the media_author. (FYI,
   I can get the media_title but not the media_caption.)
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14795089)
 * Hi [@mariwnm](https://wordpress.org/support/users/mariwnm/),
    I’m glad you got
   it working in the end using your method.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Current user shortcode’ is closed to new replies.

 * ![](https://ps.w.org/bnfw/assets/icon.svg?rev=2531573)
 * [Customize WordPress Emails and Alerts - Better Notifications for WP](https://wordpress.org/plugins/bnfw/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bnfw/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bnfw/)
 * [Active Topics](https://wordpress.org/support/plugin/bnfw/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bnfw/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bnfw/reviews/)

## Tags

 * [display name](https://wordpress.org/support/topic-tag/display-name/)

 * 9 replies
 * 2 participants
 * Last reply from: [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/current-user-shortcode/#post-14795089)
 * Status: resolved