Custom Header for different posts and pages

  • Author
    Posts
  • #1068302

    xoxbekxox
    Member

    Hello,

    I was wondering whether or not I could change in the CSS or html (in pages or individual posts) the header for particular posts and pages.

    To start perhaps this page?

    http://icraved.wordpress.com/2012/11/05/grit-strength/

    The blog I need help with is icraved.wordpress.com.

    #1068612

    WordPress.com does not offer the option to change the HTML head tag directly. You can target a specific post or page with CSS and the Custom Design upgrade though. To do it, you should look at the body tag in the page source and find out what specific CSS classes apply to the page you want to target.

    For example, you can use “postid-1819” for the http://icraved.wordpress.com/2012/11/05/grit-strength/ post. Here is an example that turns the title red for just that post:

    .postid-1819 #content .post h2 {
    	color: red;
    }

    I see that you’ve already figured this out and you used this CSS to change out the header image on that page:

    body.postid-1819 #headerimage {
    	background: url('http://i1247.photobucket.com/albums/gg636/xoxbekxox/GritHeader2.jpg') no-repeat;
    }

    Nice work!

    #1068615

    xoxbekxox
    Member

    Thanks heaps for your reply! However, I’ve recently gone self hosted and upgraded my domain and I copied and pasted this coding over but my headers aren’t showing. my blog is http://bekcraved.com and the posts are all of those in the Grit 21 Day Challenge, this page is an example- http://www.bekcraved.com/2012/11/21/grit-21-day-challenge-why-are-you-doing-it-its-not-all-about-weight-loss/

    #1068616

    @xoxbekxox
    Themes are not transferable and CSS editing is themes specific. We can’t help you here. All support for your WordPress.ORG install is provided on the WordPress.ORG support forums and they are here http://wordpress.org/support/ If you don’t have a username account at WordPress.org, click that link and register one on the top right hand corner of the page that opens, so you can post to the correct support forums for your software.

    #1068617

    xoxbekxox
    Member

    Okay thanks, I didn’t realise css editing is theme specific! My background seemed to work but not my header. I am a member there yes, thank you again :)

    #1068618

    Hi again,
    WordPress.com and WordPress.org are completely separate. WordPress.com and WordPress.org software are not the same. The themes are not the same. You cannot get CSS editing help here for your WordPress.org install and as I knew that I posted to share the information with you. Best wishes with your install.

The topic ‘Custom Header for different posts and pages’ is closed to new replies.