Support » How-To and Troubleshooting » Change background color in php

Change background color in php

  • I have created an intro page with a flash video and I would like to change the background color of just that page.

    This is my page:

    My .php file is currently just:

    Template Name: intro
    if (have_posts()) : while (have_posts()) : the_post();
    endwhile; endif;

    [please mark any posted code -http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

Viewing 1 replies (of 1 total)
  • Moderator Michael


    Forum Moderator

    that code is missing the minimal necessary html structure which is normally provided by the section of code in header.php before and inclusive the <body> tag; and in footer.php after and inclusive the </body> tag.

    get those codes from the header.php and footer.php files of your theme, and add them to this page template.

    to enable yourself to add a background to just this web page, consider to add a unique css id or class into the body tag;


    <body id="intro">

    then style this in style.css by adding:

    #intro { background: ......; }


Viewing 1 replies (of 1 total)
  • The topic ‘Change background color in php’ is closed to new replies.