If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #527

    Is it possible to have different background colors for different pages?


    Yes, the body class function gives each page / page type a unique class. If you look at the page source for the homepage you’ll see that the body code looks like this:

    <body id='top' class="home blog" >

    so you could use this CSS to define a specific background to the homepage:

    body.home { background: #FFFFFF; }

    For a subpage, eg the Portfolio the body class looks like this:

    <body id='top' class="page page-id-46 page-parent page-template page-template-default" >

    so you could use this code specifically for this page:

    body.page-id-46 {background: #FFFFFF; }

    or this code for pages:

    body.page {background: #FFFFFF;}

    This will get you started, just look at the page source for specific pages body class code. Let me know if you need further help.


    Fantastico, Thanks i’ll have a play about.

    Loving this theme, its great! thanks for your help





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

The topic ‘Background colours’ is closed to new replies.