[Resolved] Change position of meta-information (on home-page)

Home Forums Support [Resolved] Change position of meta-information (on home-page)

Home Forums Support Change position of meta-information (on home-page)

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #453750
    Edin

    Hello,

    On the home-page where all the posts are listed:

    I’d like to move the meta-information (in this case category and comments-count) directly below the article headline, and align them horizontally.

    Screenshot

    Is there a way to do that without affecting the location of the meta for the single articles?

    Thank you!

    #453936
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could try this:

    add_action( 'after_setup_theme', 'tu_move_footer_entry_meta' );
    function tu_move_footer_entry_meta() {
        if ( ! is_singular() ) {
            remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
            add_action( 'generate_after_entry_header', 'generate_footer_meta' );
        }
    }
    #453943
    Edin

    Thanks, Tom, but now they disappeared completely (I’ve put the code into the functions.php btw.).

    Here what I have ticked in the Customizer:

    Customizer

    #453953
    Tom
    Lead Developer
    Lead Developer

    Hmm, can you link me to the page?

    #454031
    Edin

    Tom, it’s on a test-site behind a password. If you like I can send you the link and password per email?

    #454150
    Leo
    Staff
    Customer Support

    You can use Account Issue here: https://generatepress.com/contact/

    #454680
    Edin

    Thank you, just sent the email.

    #454964
    Tom
    Lead Developer
    Lead Developer

    Weird that after title wasn’t working – I adjusted it to after entry header and it’s working now 🙂

    #455507
    LoGP

    This is what I was also looking for. And it works.

    But I’m actually trying to get it before the title?

    I tried before_entry_header and before_entry_title but both don’t work.

    Only after_entry_header works.

    #455561
    Leo
    Staff
    Customer Support

    Try the before_content hook: http://demo.generatepress.com/hook-locations/

    #455668
    LoGP

    Hm, no this places it above my thumbnail. It really needs to be above my title because I have my thumbnail left aligned and the title and excerpt right aligned on my blog page.

    But looking at the hook locations url there seems to be no hook to use before the page title.

    #455829
    Leo
    Staff
    Customer Support

    Can you show me what you currently have again?

    #456106
    Edin

    Tom, sorry for the late feedback, but thank you for making the change manually. It worked beautifully. I really appreciate your help.

    Is there any way to put both metas horizontally?

    Screenshot

    Thanks again,
    Edin

    #456282
    Leo
    Staff
    Customer Support

    Try this CSS:

    .cat-links, .comments-link {
        display: inline-block;
    }
    #456509
    LoGP

    Hey Leo,

    Check this is what I have:

    View post on imgur.com

    So the category needs to come on top of the title.

    Cheers
    L

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