[Resolved] post info layout change

Home Forums Support [Resolved] post info layout change

Home Forums Support post info layout change

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1224304
    johnaps

    Hello, i would like to make the posts that are shown on any archive or post look like this
    https://ahrefs.com/blog/
    More specifically, the category of the post to be shown above title and not bellow as is the default
    And under the title to have author name with image first and the date to come second…

    Is this possible??

    Thank you in advance!!

    #1225206
    David
    Staff
    Customer Support

    Hi there,

    this doc explains how to include the author avatar and display it inline with the Meta:

    https://docs.generatepress.com/article/entry-meta-style/#example-1

    To reposition the footer meta above the title try this:

    add_action( 'after_setup_theme', 'tu_move_entry_meta' );
    function tu_move_entry_meta() {
        if ( !is_single() ) {
            remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
            add_action( 'generate_before_entry_title', 'generate_footer_meta' );
        }
    }
    #1226105
    johnaps

    Thank you very much David!!! Only problem left as you can see here http://thefinterestcom.kinsta.cloud/travel/
    is that the date has been duplicated and been added in top of title also… can we remove it from there somehow? Also now how can i upload and set an image for the author?

    #1226528
    Leo
    Staff
    Customer Support

    Are you using this snippet?

    add_filter( 'generate_footer_entry_meta_items', function( $items ) {
        return array(
            'date',
            'categories',
        );
    } );

    If so try this instead:

    add_filter( 'generate_footer_entry_meta_items', function( $items ) {
        return array(
            'categories',
            'post-navigation',
        );
    } );

    As for author image, try this site:
    https://en.gravatar.com/

    #1226755
    johnaps

    Thank you :))) !!!

    #1226886
    Leo
    Staff
    Customer Support

    No problem 🙂

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