[Support request] Show post time

Home Forums Support [Support request] Show post time

Home Forums Support Show post time

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1150808
    Marc-Antoine

    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 ๐Ÿ™‚

    #1150817
    g33kgirl
    #1150852
    Marc-Antoine

    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

    #1150928
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This might help: https://generatepress.com/forums/topic/add-time-to-post-meta/#post-1133548

    Let me know ๐Ÿ™‚

    #1151092
    Marc-Antoine

    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 ๐Ÿ™‚

    #1151472
    Tom
    Lead Developer
    Lead Developer

    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"]

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.