Title: Shortcode
Last modified: April 24, 2023

---

# Shortcode

 *  [seekbeacon](https://wordpress.org/support/users/seekbeacon/)
 * (@seekbeacon)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/shortcode-948/)
 * Great plugin, very useful – any chance that a shortcode could be added to be 
   able to display last login date/time on any page/post please?

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

 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/shortcode-948/#post-17114142)
 * Hi [@seekbeacon](https://wordpress.org/support/users/seekbeacon/)
 * Sorry for the delay here, it’s been really busy.
 * I wrote a small custom code snippet that you may use for the time being, and 
   I’ll consider to add it to the plugin – [https://gist.github.com/andrewlimaza/c1bf2016687aacbb18c7059de41f0ad1](https://gist.github.com/andrewlimaza/c1bf2016687aacbb18c7059de41f0ad1)
 * Hope this helps! Have a good one.
 *  Thread Starter [seekbeacon](https://wordpress.org/support/users/seekbeacon/)
 * (@seekbeacon)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/shortcode-948/#post-17115499)
 * Thanks, that works fine. I suggest that it needs to be modified to show a human
   date rather than an epoch date.
 * But that shows effectively the current login, rather than the previous login 
   to the current one, which was what I really wanted. So in the end I managed to
   write some code (with the help of ChatGPT – I’m no coder really) that recorded
   the current login as ‘last_login’ to the WP database and then a function that
   pulled that down as a shortcode. So maybe in your next revision you might want
   to include that as an option as well, as your plugin must already record that
   somewhere.

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

The topic ‘Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/when-last-login/assets/icon-256x256.png?rev=1665438)
 * [When Last Login](https://wordpress.org/plugins/when-last-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/when-last-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/when-last-login/)
 * [Active Topics](https://wordpress.org/support/plugin/when-last-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/when-last-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/when-last-login/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [seekbeacon](https://wordpress.org/support/users/seekbeacon/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/shortcode-948/#post-17115499)
 * Status: not resolved