Custom Header for different posts and pages

  • Author
  • #1068302



    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?

    The blog I need help with is

    #1068612 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 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('') no-repeat;

    Nice work!



    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 and the posts are all of those in the Grit 21 Day Challenge, this page is an example-


    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 If you don’t have a username account at, 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.



    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 :)


    Hi again, and are completely separate. and software are not the same. The themes are not the same. You cannot get CSS editing help here for your 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.