[Support request] All Meta In One Single Line Part 2

Home Forums Support [Support request] All Meta In One Single Line Part 2

Home Forums Support All Meta In One Single Line Part 2

  • This topic has 11 replies, 3 voices, and was last updated 4 years ago by Tom.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1224493
    Lars

    I am using a function from May 14,2015 “All Meta In One Single Line”, concerning how to get all the post meta data in single line below the post title. Support ticket: https://generatepress.com/forums/topic/all-meta-in-one-single-line/#post-108079.

    The function works in WordPress 5.2.4 but not in WordPress 5.3.2 and later.

    Can you check thats wrong and can you update the function please.

    Lars Eriksson, Sweden

    #1225388
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That function is very old.

    Instead, use this filter: https://docs.generatepress.com/article/generate_header_entry_meta_items/

    For example:

    add_filter( 'generate_header_entry_meta_items', function() {
        return array(
            'date',
            'author',
            'categories',
            'tags',
            'comments-link',
        );
    } );

    Let me know 🙂

    #1229442
    Lars

    Yes it functions. Shall I use the same code below to remove meta from the bottom of the page?:

    footer.entry-meta {
    display: none;
    }
    .cat-links, .tags-links, .comments-link {
    display: inline-block;
    margin-left: 10px;
    }

    See: https://generatepress.com/forums/topic/all-meta-in-one-single-line/#post-108079

    #1230152
    Tom
    Lead Developer
    Lead Developer

    Do this instead:

    add_filter( 'generate_footer_entry_meta_items', '__return_false' );

    #1230921
    Lars

    Thanks! Works. I wonder wy I don´t get a “comments-link” ? Do you have any idee?

    See: https://fotografregistret.se/augusta-chytraeus/

    #1231382
    David
    Staff
    Customer Support

    Hi there,

    can you check if they appear on a post that has comments ?

    #1232123
    Lars

    Its a new site without comments. Is ‘comments-link’ the right kode?

    Lars E

    #1232878
    Tom
    Lead Developer
    Lead Developer

    comments-link is the correct name.

    Is the comment meta item enabled in Customize > Layout > Blog?

    #1237208
    Lars

    I cant se any “comment meta item” in the Customizer:

    Meta

    #1237591
    Tom
    Lead Developer
    Lead Developer

    Is it enabled in the Archive tab?

    #1237639
    Lars

    I cant see anything about displaying “Comments”, not in Single and not in Archive, only: Display read more as button, Display post date, Display post author, Display post categories, Display post tags, Display comment count, Use infinite scroll.

    Lars E

    #1237981
    Tom
    Lead Developer
    Lead Developer

    The “Display comment count” is the one you want to check.

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