WordPress.org

Ready to get started?Download WordPress

Forums

Page background, different color than home ?? (5 posts)

  1. boblebad
    Member
    Posted 4 years ago #

    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

  2. boblebad
    Member
    Posted 4 years ago #

    New link: My site

    Best regards
    Carsten, Denmark

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  4. boblebad
    Member
    Posted 4 years ago #

    Hi esmi

    Thanks, i'll look into it :)

    Best regards
    Carsten, Denmark

  5. enginehaus
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic