• Hello! I’ve been trying out different CSS to change the font color of post header/title on the portfolio page. However, every code that I put also changes the font globally on my blog and I don’t want that.

    Right now the title of my posts are generally black and this works fine because the background is white. However, on Portfolio page the background is black so titles are invisible. I would like to keep the black background and change the font to white. Could you please help? Thanks!!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your porfolio archive has another body class of post-type-archive-jetpack-portfolio
    So you can make changes to the portfolio archive by prefixing your targeted classes like so:

    .post-type-archive-jetpack-portfolio h2.post-title a {
    color: #fff;
    }

    On single portfolio pages, you can prefix with >> single-jetpack-portfolio

    When you use inspect element in your browser to view a page, check the body class to see which class is unique to the page you want to make changes to.
    Then target that unique class.

    Hope this all makes sense?

    Cheers.

    Thread Starter divokoza

    (@divokoza)

    Hello! Thank you so much, it works wonderfully!! I followed the formula and also changed successfully the font of h1.post-title! ??????
    Have a great day!!
    Cheers,
    Tea

    Hi Tea,
    That’s great news! Glad to be of help.
    Well done. I’m really pleased for you ??
    Have a great day too.
    Cheers,
    Osa

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change font color of post title/header on Portfolio page exclusively’ is closed to new replies.