Site logo

[Resolved] How do I change font color and style on latest posts block?

Home Forums Support [Resolved] How do I change font color and style on latest posts block?

Home Forums Support How do I change font color and style on latest posts block?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2476869
    Tommy

    How do I change the H2 font color back to black (it’s linked and is same color as paragraph font for links)?
    How do I change the font to Merriweather, which I have above the heading above, but cannot find when I look in this block.
    Also, how do I center the H2 title??

    Thanks in advance

    #2476876
    Tommy

    *I want to keep the content link as it is and only change back the H2 fonts in the latest posts blocks

    #2477064
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    
    /* latest post title link style */
    .wp-block-latest-posts li .wp-block-latest-posts__post-title {
        color: #000;
        display: block;
        text-align: center;
        font-family: Merriweather, serif;
        font-weight: 400;
    }
    /* latest post hover over title link color */
    .wp-block-latest-posts li:hover .wp-block-latest-posts__post-title {
        color: #f00;
    }
    /* Adjust latest post block spacing */
    .wp-block-latest-posts__list .wp-block-latest-posts__featured-image {
        margin-bottom: 0;
    }
    #2477096
    Tommy

    That sorted the color, thanks David. What about my 2 other queries, should I create separate tickets for them? Or can they be redesigned in the same CSS?

    #2477109
    David
    Staff
    Customer Support

    Oops didn’t see that 🙂
    I edited the CSS above:

    https://generatepress.com/forums/topic/how-do-i-change-font-color-and-style-on-latest-posts-block/#post-2477064

    And i included another CSS rule to reduce the space between image and title. Just in case

    #2477115
    Tommy

    That worked a treat, thank you!

    #2477687
    David
    Staff
    Customer Support

    You’re welcome

    #2485849
    Tommy

    Hi David,

    How do I edit this CSS so I can adjust the category/tag pages to resemble to post block?

    The font is much bigger and and spread from the image, and I’d like them to be the same. Thanks in advance.

    #2486831
    David
    Staff
    Customer Support

    Hi there,

    1. Add this CSS to center the text and remove the space between image and title:

    
    .generate-columns-container .post .inside-article .post-image {
        margin-bottom: 0;
    }
    .generate-columns-container .post .inside-article {
        text-align: center;
    }

    2. in Customizer > Typography – you can Add new typography and select the Archive Content Title H2 to set the font size / styles.

    #2486852
    Tommy

    Brilliant, thank you!

    #2486895
    David
    Staff
    Customer Support

    You’re welcome

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