[Support request] Single Post Custom Category Meta Not Showing (After Update)

Home Forums Support [Support request] Single Post Custom Category Meta Not Showing (After Update)

Home Forums Support Single Post Custom Category Meta Not Showing (After Update)

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #1507144
    Tom
    Lead Developer
    Lead Developer

    So the CSS in that topic is targeting an element like this:

    <div class="entry-meta cat-links">
       ...

    However, that’s not our default structure, it should look like this:

    <div class="entry-meta">
        <span class="cat-links">
            ...

    So, the CSS from that topic never should have worked in the first place unless you had altered the HTML structure.

    If you’re not sure how the HTML was altered, you can change all instances of this in your CSS:

    .entry-meta.cat-links

    To this:

    .entry-meta .cat-links

    #1512753
    Rohan Verma

    It seems that the category meta is already showing at the bottom of the article in the custom look instead of the default look.

    Pushing that at the top and restoring the default category meta at the bottom is required.

    Screenshot: https://prnt.sc/vaumkt

    #1513721
    Tom
    Lead Developer
    Lead Developer

    Ok, so to confirm:

    1. You want the list of categories with the custom look to be above your title on single posts.
    2. You also want the list of categories with the default look to be in the footer of your single posts.

    Were you accomplishing this before updating to 3.0? If so, how? The topic you linked to didn’t have any code that would move the categories away from their default location.

    #1520736
    Rohan Verma

    Yes.

    #1521040
    Tom
    Lead Developer
    Lead Developer

    How were you doing this previously? I want to make sure the code we provide doesn’t conflict with what’s already there.

    #1525696
    Rohan Verma
    #1525934
    Tom
    Lead Developer
    Lead Developer

    There is no code in that topic that would move the categories above your post title. It only has CSS for styling the category items.

    To add categories above the title, we could try this:

    add_action( 'generate_before_entry_title', function() {
        if ( is_single() ) {
            echo '<div class="entry-meta">';
                generate_do_post_meta_item( 'categories' );
            echo '</div>';
        }
    } );

    Does that do the trick?

    #1530219
    Rohan Verma

    Yes it does.

    But the box format isn’t there like before. Can you suggest just like this one: https://generatepress.com/forums/topic/look-of-single-post-category/

    #1530578
    Tom
    Lead Developer
    Lead Developer
    #1571721
    Rohan Verma

    Yes. Now, looks fine.

    But the same meta is also appearing at the bottom of the article along with the default meta. How to remove the bottom one?

    #1571882
    Leo
    Staff
    Customer Support

    Can you try unchecking the option in the customizer first?
    https://docs.generatepress.com/article/blog-content-layout/#single

    Let me know if it somehow removed both 🙂

Viewing 11 posts - 16 through 26 (of 26 total)
  • You must be logged in to reply to this topic.