Title: Shortcode for current user
Last modified: May 5, 2026

---

# Shortcode for current user

 *  [paizo](https://wordpress.org/support/users/paizo/)
 * (@paizo)
 * [6 days, 23 hours ago](https://wordpress.org/support/topic/shortcode-for-current-user/)
 * Hi,
 * For the New Post Published notification, I want to specify which user published
   the post, either instantly or by schedule.
 * For example, an editor called John Smith might publish an article written by 
   Jane Doe. I would then want the notification email to read something along the
   lines of ‘John Smith published BNFP is the best WordPress plugin by Jane Doe.’
 * Documentation suggests the [display_name] shortcode references the person triggering
   the notification, but that doesn’t appear to be the case as [display_name] shows
   as the same as the post author.
 * Hope my explanation is clear and thanks in advance for any help.

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

 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [6 days, 6 hours ago](https://wordpress.org/support/topic/shortcode-for-current-user/#post-18900312)
 * Hi [@paizo](https://wordpress.org/support/users/paizo/),
    I would test this with
   the ‘recipient user shortcodes’ and the ‘user shortcodes’ as per [this page](https://betternotificationsforwp.com/documentation/notifications/shortcodes/?notification=new-post)
   to see if you can get your combination to work. There is also the `Original Post
   Author: [post_author]` shortcode you can use too, which may help.
 * Let me know how you get on.
 *  Thread Starter [paizo](https://wordpress.org/support/users/paizo/)
 * (@paizo)
 * [6 days, 1 hour ago](https://wordpress.org/support/topic/shortcode-for-current-user/#post-18900560)
 * Hi Jack,
 * Thanks for getting back to me.
 * Tried the suggestions but to no avail. The recipient user shortcode calls the
   recipient name, while the user shortcode calls the author name, rather than the
   person currently logged in.
 * I would have thought user shortcode would have been correct, but it doesn’t seem
   to work the way I’d imagined.
 * Using the above example again, if an editor called John Smith publishes an article
   written by Jane Doe, a notification using the following code – ‘[display_name]
   published: [post_title] by [post_author]’ returns ‘Jane Doe published: Random
   Post by Jane Doe’
 * What I’m trying to achieve is ‘John Smith published: Random Post by Jane Doe’
    -  This reply was modified 6 days, 1 hour ago by [paizo](https://wordpress.org/support/users/paizo/).
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [5 days, 6 hours ago](https://wordpress.org/support/topic/shortcode-for-current-user/#post-18901335)
 * Hi [@paizo](https://wordpress.org/support/users/paizo/),
    Thanks for testing.
   That all makes sense.
 * Let me have a think about this scenario. As this is a long-standing notification
   in BNFW, any changes to it may break many notifications plugin users may have
   so I want to ensure that should any changes to this be made, they do not cause
   issues.
 *  Thread Starter [paizo](https://wordpress.org/support/users/paizo/)
 * (@paizo)
 * [5 days, 5 hours ago](https://wordpress.org/support/topic/shortcode-for-current-user/#post-18901366)
 * Thanks Jack, look forward to seeing what you come up with.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-for-current-user%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 4 replies
 * 2 participants
 * Last reply from: [paizo](https://wordpress.org/support/users/paizo/)
 * Last activity: [5 days, 5 hours ago](https://wordpress.org/support/topic/shortcode-for-current-user/#post-18901366)
 * Status: not resolved