Site logo

Archived topic

Change font colour for "Post Title" in query loop

6 replies · Started by Christopher on May 11, 2022

Viewing posts 1–7 of 7

Hey guys,

rather than displaying my news in excerpts on the main page, I just want to incoperate one small line of text with the headline of the latest news and a link to the news. For that I have the query loop in place, but I am unable to change the color of the text. The container options dont apply for it, I guess because it sits in the query loop? Any tips?

Editor view:
https://www.screencast.com/t/UFxN9Kvm

live view:
https://www.screencast.com/t/rjiwFoqt

Thanks
Chris

Hi there,

WP core didn't add color options to its theme blocks like the Post title. instead try selecting the immediate parent Container Block and setting its Text and Link colors.

Regarding the width - is the content in side a Grid or a Container Block that has a limited Inner container width ?

Hi David, I tried the Container options but the Text settings I put in there dont apply to the text sadly. Feel free to have a look, i just send you the log in data in the other thread. Cheers

Select the Post Title block, and in the Advanced > Additional CSS Class(es) give it a custom class eg. red-color or something appropriate then use some CSS to style the link:

.inside-article .red-color a {
    color: #f00;
}

Thanks, that worked! =)

Glad to hear that!

This archived topic is closed to new replies.