Site logo

Archived topic

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

10 replies · Started by Tommy on December 29, 2022

Viewing posts 1–11 of 11

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

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

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;
}

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?

That worked a treat, thank you!

You're welcome

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.

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.

Brilliant, thank you!

You're welcome

This archived topic is closed to new replies.