I have this snippet that does the job for outputting the user’s last login time
$user = wp_get_current_user();
$last_login = get_user_meta( $user->ID, 'last_login', true );
if ( $last_login ) {
$last_login_time = date_i18n( 'd-m-Y', strtotime( $last_login ) );
echo '<p>Last Login: ' . esc_html( $last_login_time ) . '</p>';
}
I’d like to use bricks dynamic tags to output this data on the frontend.
This tag works: {wp_user_meta:last_login}
but outputs it as: 2023-04-09 20:38:43
I’d like to output it in dd-mm-yyyy format and no time. But I’m unsure how to do that.
It seems like this bit from the documentation would get me there
:text value – Depending on the context it could mean the following:
User or term custom field meta key
The URL parameter key
Post terms separator
Date format
Image size slug (e.g. thumbnail, or full)
The echo tag function name
But is unclear. Any direction is appreciated.