WordPress.org

Support

Support » Themes and Templates » Page background, different color than home ??

Page background, different color than home ??

  • Hi there

    I’m running ZenGard on the latest WordPress, and trying to build a site on it 🙂

    My site

    I would like to color the backgrund of the post on the Pages a color green like the one at the top with the logo, they are informative pages, and i therefor would like them to be a different color than ordinary posts

    Can i just do that, or will it affect all posts, and do i therefor need another class for that, and is that a lot of work editing code to get it to work ??

    Best regards
    Carsten, Denmark

Viewing 4 replies - 1 through 4 (of 4 total)
  • New link: My site

    Best regards
    Carsten, Denmark

    esmi

    @esmi

    Forum Moderator

    You could try changing <body> in header.php to <body id="top" <?php body_class(); ?>>. Then you could use the generated list of classes attached to the body tag to just style your Pages using CSS.

    Hi esmi

    Thanks, i’ll look into it 🙂

    Best regards
    Carsten, Denmark

    You could also create a second header file, such as page_header.php and instead of using <?php get_header(); ?> at the top of the page, try using <?php include “page_header.php”; ?>

    You’ll have two headers to update if you make changes but usually that isn’t a big deal.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page background, different color than home ??’ is closed to new replies.
Skip to toolbar