Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #3412

    Hi,

    How would I go about altering a single pages title colour or boldness, etc, without having this choice affect every single page?

    Thanks

    #42108

    Hey,

    If you look at the page source, the body tag displays a list of classes specific to the page you’re on. So for example, a single page on the demo has these classes:

    single single-post postid-11 single-format-standard

    You can use this to modify CSS elements, if you wanted to modify every single page you could use:

    .single .ELEMENT {
    // my custom CSS for single goes here
    }

    or you can be more specific, so only for this post:

    .postid-11 .ELEMENT {
    // my custom CSS for single goes here
    }

    where the post has an ID of 11.

    James

    #42109

    Where would I add this code? I tried adding it to the style sheet (with my own page id though) and nothing seemed to change.

    #42110

    Hey,

    I’d add any custom CSS to the end of style.css (remember to keep a backup when upgrading your theme).

    Alternatively, you can use FireBug to help you figure out which CSS elements are controlling which elements of the theme and just modify these sections.

    James

    #42111

    Hmm, I tred exactly that, and nothing appears to be changing. So on a single page, how would I change the colour of just the title for instance?

    EDIT: Also, firebug reveals a lot about some things, and will certainly be helpful down the line, but doesn’t help with knowing how to alter the code seperatly…? (also, everything is fairly simple css/html except for the home title, which was incredibly complicated for some reason.)

    #42112

    Hey,

    just find out the page id (i.e 30.).

    Then use the code James posted above:

    .postid-30 .ELEMENT {
    color: #fff !important;
    }

    To change the color for certain pages/posts, etc.

    I can’t give you exact instructions without getting a link to your website.

    #42113

    Hmm, thats odd. Does it have to be postid? as my page reads page-id. The link is http://www.identityconsulting.co.uk/Newsite/

    Sorry for the lack of sense on my part, I’m technically the company programmer and website designer now, but all I was hired as was a graphics guy, so not much with the knowledge on this!

    Thanks.

    #42114

    Yes – you’re right. For pages you must use page-id..

    Example: http://www.identityconsulting.co.uk/Newsite/?page_id=2

    If you want to change the about headline use following code:

    .page-id-2 .siteheading, .page-id-2 .siteheading a{
    color: #ff0000 !important;
    }

    Adjust the color, post/page id as you like. If it’s a post use .post-id otherwise .page-id

    #42115

    Well…now I just feel stupid :/

    I’ve pasted exactly that into the end of my style.css, but changed the colour to what I want…and absolutely nothing changes?

    I’m really confused now!

    #42116

    Hey,

    I just saw that the color value I posted above was wrong (only 5 instead of 6 digits). If you tried it with my sample code please try it again (I updated the code above)….

    #42117

    Thanks very much, that works now (I must have entered my own color code wrong as well!) Is there a reference sheet somewhere that I can refer to so I know what the code is for the body, or the x or the y?

    #42118

    Affect everything suddenly works (even though I think I deleted the code…wierd) except for a couple of pages-

    http://www.identityconsulting.co.uk/Newsite/?page_id=518

    and

    http://www.identityconsulting.co.uk/Newsite/?page_id=508

    It’s also not affecting my blog entry list titles (though it does affect their pages) and it is affecting my postfolio entries, but not their titles on the portfolio page.

    What commands would make it also affect them? Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Change title colour/size/boldness for each individual page?’ is closed to new replies.