[Support request] Relocating “category” below “date” on post archive page

Home Forums Support [Support request] Relocating “category” below “date” on post archive page

Home Forums Support Relocating “category” below “date” on post archive page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2187189
    HD

    Hello,

    As the topic title suggests, I’d like to move the Categories position on the blog page. It should look like this:

    – Post Title
    – Date
    – Post Categories
    – Post Tags

    Right now the Categories and Tags are displayed at the bottom:

    Is there a way to simply move it up on the default archive page without redesigning the entire archive using the content-template block element?

    Thanks!

    #2187197
    Fernando
    Customer Support

    Hi HD,

    Thank you for creating a new topic.

    Yes, you should be able to create such a layout through a Content Template – Block Element.

    You may also want to check the templates available and see if any works for you: https://share.getcloudapp.com/nOuR1mpj

    This could be possible through CSS as well. If you can provide the link to the site in question, I’ll try to see if I can provide a fix.

    Either should work.

    Hope this clarifies. 🙂

    #2187468
    HD

    Thank you for your reply. I’ve shared the link in the private information area. Please let me know any quick fix if possible. Thank you!

    #2187489
    David
    Staff
    Customer Support

    Hi there,

    add this PHP Snippet to add the category terms there:

    add_filter( 'generate_header_entry_meta_items', function() {
        return array(
            'date',
            'categories',
        );
    } );

    and add this snippet to remove them for their current position:

    add_filter( 'generate_footer_entry_meta_items', function( $items ) {
        return array_diff( $items, array( 'categories' ) );
    } );
    #2187510
    HD

    Hello!

    Thank you for your time! I added the snippets, but they have some problems:

    1. No default icon on the left
    2. Appearing adjacent to date rather below

    What could be done in this case? Thanks!

    #2187536
    David
    Staff
    Customer Support

    remove this:

    add_filter( 'generate_header_entry_meta_items', function() {
        return array(
            'date',
            'categories',
        );
    } );

    And add this instead:

    add_action( 'generate_after_entry_title', function() {
        generate_do_post_meta_item( 'categories' );
    } );
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.