[Support request] Move date in posts

Home Forums Support [Support request] Move date in posts

Home Forums Support Move date in posts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1583222
    auerbach

    I’d like to move the date displayed in posts to a less prominent position — to the right side, or to the bottom of the post. I’ve seen a suggestion here to use a lengthy PHP script, but I’d rather avoid that.

    #1583390
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can move it to the bottom of the post like this:

    add_filter( 'generate_header_entry_meta_items', function( $items ) {
        return array_diff( $items, array( 'date' ) );
    } );
    
    add_filter( 'generate_footer_entry_meta_items', function( $items ) {
        $items[] = 'date';
    
        return $items;
    } );

    Let me know if that does the trick or not 🙂

    #1583422
    auerbach

    Hi Tom. Thanks for the quick response, but unfortunately that had no effect when pasted in to Additional CSS in Customizer.

    #1583588
    Elvin
    Staff
    Customer Support

    Hi,

    Hi Tom. Thanks for the quick response, but unfortunately that had no effect when pasted in to Additional CSS in Customizer.

    The code Tom posted is a PHP Snippet.

    To make it work, Here’s how to add PHP snippets –
    https://docs.generatepress.com/article/adding-php/

    #1583634
    auerbach

    Elvin – Thanks for that! Using it as a snippet worked.
    I do wish GeneratePress had more built-in customization options, but I guess that would add to the theme’s bulk and slow it down.
    I appreciate your and Tom’s help.

    #1583652
    Elvin
    Staff
    Customer Support

    I do wish GeneratePress had more built-in customization options, but I guess that would add to the theme’s bulk and slow it down.

    That’s true. This is actually a known drawback with some page builders.

    We’re glad it works for you. No problem.

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