WordPress.org

Ready to get started?Download WordPress

Forums

Page Template Problem (4 posts)

  1. lbrownie
    Member
    Posted 7 years ago #

    It's really weird, the theme for my site includes a black background. The homepage and all the categories (except 2) display the black background(http://larrybrownsports.com) But when you visit any of the pages under the navigation, it's like the theme changes and the background becomes white (using IE browser). However, when I hit the "refresh" button, the page background turns to black, the way it's supposed to look. I reloaded the original code into the page.php and it still hasn't changed. Anyone know how I can fix this?

  2. jkeyes
    Member
    Posted 7 years ago #

    That's weird alright. It works fine in FF but I noticed the same behavior you mentioned with IE.

    To make sure it's not a weird caching issue you could append a random number to the end of the css href:

    
    <?php
    srand(time());
    $random = (rand()%1000);
    ?>
    <link ... href="style.css?v=<?php echo($random);?>"/>
    

    Not sure if this will help but it may be worth trying.

  3. lbrownie
    Member
    Posted 7 years ago #

    Thanks for the help. A few questions though, where should I add that code, in the page template? If so, should I put that whole thing or just one piece, and where in the loop?

    Thanks

  4. jkeyes
    Member
    Posted 7 years ago #

    Just try adding it to the header.php where it currently adds the style.css.

    It currently outputs:

    
    <link rel="stylesheet" href="http://larrybrownsports.com/wordpress/wp-content/themes/daily-digest-20-20/style.css" type="text/css" media="screen" />
    

    I don't know if this will help but it's worth trying.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.