WordPress.org

Ready to get started?Download WordPress

Forums

Surfarama
[resolved] post and page title colours (9 posts)

  1. StaceyMercer
    Member
    Posted 11 months ago #

    Hi I am using the Surfarama theme for my website but was wondering if there was any way of having the post titles take the colour from the category that it is set to? If it is possible where do I add whatever code is needed and what is the code that is needed. I've been looking at the WP Codex for information but it is a bit confusing and with the theme already doing most of what I want I'm not sure how to go about the changes I want.

    My website is staceymercer.co.uk

    Also I have a few static pages that are connected to some of my categories and I would like the titles of these pages to be the same colour as the category they relate to. For example I have a page called Food Heaven, Food Hell that is the welcome page for that section, then have a page of posts as well. If anyone could help me I would be very grateful.

  2. Howdy_McGee
    Member
    Posted 11 months ago #

    You might be able to achieve this with CSS. Though it looks like Food Heaven, Food Hell is purple, and the posts under it are also purple, so i'm not 100% sure what you're asking.

  3. StaceyMercer
    Member
    Posted 11 months ago #

    I actually mean when you are reading the post like this one or ona a static page like Food Heaven, Food Hell
    What I would like is to have the titles the same colour as the category colour

  4. stacyduval
    Contributor Day Volunteer
    Posted 11 months ago #

    Try this in your CSS file:

    /******* Change the color of the post title for Food Heaven to Pink **/
    #post-661 .entry-title  {
    color:#bf78cf;
    }

    Hopefully his will change the color on the Food Heaven, Food Hell welcome page.

    I see you have a child theme, so put this CSS code in your style.css file in your child theme folder.

    To do the rest of the pages you just need to find out the post number and change the color accordingly.

    Let me know if this works.

  5. stacyduval
    Contributor Day Volunteer
    Posted 11 months ago #

    I realize I made a mistake and that I meant change the color to purple.

  6. StaceyMercer
    Member
    Posted 11 months ago #

    Thanks I'll try that :)

  7. StaceyMercer
    Member
    Posted 11 months ago #

    is there a way of doing this so that if a post has, say, the portfolio category it will be pink. I tried changing the post id to cat id like this

    /******* Change the color of the post title for Portfolio to Pink **/
    #id-87 .entry-title  {
    color:#e5749f;
    }

    But it hasn't worked, is it because the post has more than 1 cat assigned to it or because the code is wrong? Do I need to format it differently?

  8. StaceyMercer
    Member
    Posted 11 months ago #

    By the way it has worked for the static pages so thanks :)

  9. StaceyMercer
    Member
    Posted 11 months ago #

    Not to worry I've found how to do it. Thanks for your help :)

Reply

You must log in to post.

About this Theme

About this Topic