Archived topic
Show post time
5 replies · Started by Marc-Antoine on January 31, 2020
Hi
I'm using generatepress with Broadcast and I'm looking to show post time (ex : example 5:00pm)
Currently, it only shows post date with header template tag {{post_date}}
Do you have any idea ?
Thanks :)
Unfortunately it doesn't works. As the other user, the result is it now displays “Last Updated:” but with no date.
I do not have any other custom functions
Hi there,
This might help: https://generatepress.com/forums/topic/add-time-to-post-meta/#post-1133548
Let me know :)
Thanks it works.
Do you know if there is a template tag to show informations entered in author profile (like biography, twitter account...).
It appears on AMP version but not in the header element
thanks :)
Hi there,
There isn't, but you can build a shortcode.
add_shortcode( 'user_meta', function( $atts ) {
$atts = shortcode_atts( array(
'field' => '',
), $atts, 'user_meta' );
if ( $atts['field'] ) {
return get_the_author_meta( $atts['field'] );
}
} );
Available fields are here: https://developer.wordpress.org/reference/functions/get_the_author_meta/
Then you should be able to do this:
[user_meta field="user_firstname"]