[Resolved] How can I move the tags so they are at the top of the post, below the author?

Home Forums Support [Resolved] How can I move the tags so they are at the top of the post, below the author?

Home Forums Support How can I move the tags so they are at the top of the post, below the author?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1462796
    Anne

    I’d like to change the location of the tags from the bottom of posts to the top of posts, just below the author.

    I looked through the settings but didn’t notice any option for that.

    Is there an easy way to achieve this?

    Thanks!

    #1462814
    Elvin
    Staff
    Customer Support

    Hi Anne,

    You can go to these pages to get references on what codes to use.

    https://docs.generatepress.com/article/generate_header_entry_meta_items/
    https://docs.generatepress.com/article/entry-meta-style/

    You can also follow this topic’s solution. It’s pretty similar.
    https://generatepress.com/forums/topic/change-metadata-order-on-blog-archives/#post-1345450

    The solutions are PHP filters. Here’s how to add PHP – https://docs.generatepress.com/article/adding-php/

    #1462904
    Anne

    That was a big help thanks. I am using a child theme so i can just add my snippets right to the functions.php which is easy – except the snippet in the topic you linked didnt work for me.

    This array does work for me tho:

    add_filter( 'generate_header_entry_meta_items', function( $items ) {
        if ( is_single() ) {
            $items = array(
                'author',
                'tags',
            );
        } return $items;
    } );

    However, it displays the author and tags inline where as id rather the author be its own line. Is this better to achieve with alterting the snippet or just css?

    Nevermind i just achieved it using css.

    However, the :before css I have styled to the tags at the end of the post isnt being applied to the same tags at the top:

    .tags-links:before {
        font-family: inherit;
        content: "Tags:";
        width: auto;
    }

    It’s missing the ‘Tags:’ Content but thats not really a big deal i guess. Just curious if you can figure out why that is?

    #1462914
    Elvin
    Staff
    Customer Support

    Nevermind i just achieved it using css.

    Nice one. That’s actually the way to go.

    However, the :before css I have styled to the tags at the end of the post isnt being applied to the same tags at the top:

    .tags-links:before {
        font-family: inherit;
        content: "Tags:";
        width: auto;
    }

    It’s missing the ‘Tags:’ Content but thats not really a big deal i guess. Just curious if you can figure out why that is?

    You’ll have to add display:inline-block;. 🙂

    #1463019
    Anne

    lovely thank you guys again for the support! Solved.

    #1463027
    Elvin
    Staff
    Customer Support

    Nice one!

    No problem. Always glad to be of any help. 😀

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