[Support request] Move Categories and Comments Tags

Home Forums Support [Support request] Move Categories and Comments Tags

Home Forums Support Move Categories and Comments Tags

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #816124
    Greg

    Currently, the Category and Comment meta tag are located on the bottom left of each blog entry and single post entry. How can I move them (category and comment meta tags) below the Blog title on both blog page and single post where the date and blog author name are located. Kinda like this β€”> where I’m pulling my inspiration https://www.wpkube.com/

    Can you help me with this? Love to get this done.

    Thanks,
    Greg

    #816799
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This is going to get much easier in GP 2.3, thankfully.

    For now, you can do this:

    add_filter( 'generate_post_date_output', function( $output ) {
        echo $output;
    
        $categories_list = get_the_category_list( ', ' );
        if ( $categories_list ) {
            echo '<span class="cat-links">' . $categories_list . '</span>';
        }
    
        if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
            echo '<span class="comments-link">';
                comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) );
            echo '</span>';
        }
    } );

    Then you can disable the standard categories and comments links in Customize > Layout > Blog.

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know πŸ™‚

    #816821
    Greg

    Thanks, Tom

    You can see it live. A couple things. I lost the category folder. But more importantly, can this be on a single line from left to right instead of stacked. Such as Date / Author / Category (with the folder icon) / Comments.

    I think that would look much cleaner than a stacked group. Can we make that happen?

    Thanks Again, Tom
    Greg

    #817088
    Tom
    Lead Developer
    Lead Developer

    I just adjusted the code so the folder will show up: https://generatepress.com/forums/topic/move-categories-and-comments-tags/#post-816799

    Your site seems to be under maintenance mode – any chance you can remove that for now?

    Let me know πŸ™‚

    #1111511
    Toni

    Hi Tom
    The php code works in the current version of GP?
    I need to move comments and cathegory in one single line, and dont work πŸ™
    I paste the phpcde in Code Snippets and disable the standard categories and comments, but nothing seems to happen.

    Thanks in advance.

    #1111817
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are you wanting to move the comments and categories into the header entry meta (below the post title), or keep them in the footer entry meta?

    Let me know πŸ™‚

    #1111957
    Toni

    Hi Tom! nice to meet you. My english is too bad, and i think that a picture is worth more than a thousand words. The picture is my actual footer entry meta and a photoshop montage with my desired footer entry meta.

    View post on imgur.com


    My idea is all in one line. Date of publish, category, tags… (left align) and right align only comments.

    #1112043
    David
    Staff
    Customer Support

    Hi there,

    are you able to share a link to your site ?
    Might be best to create a New topic where you can share your site privately using the Site URL field.

    #1112097
    Toni

    I’m sorry, I’m a newbie. How do I send you the URL of my website through the forum privately?

    #1112131
    David
    Staff
    Customer Support

    If you can raise a new topic – you will see a Site URL field – only GP Support can see the content of that field.

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