• Resolved FeralReason

    (@feralreason)


    Just getting started trying to learn how to modify the default theme but I cannot seem to find out how to change the background image for the #page div. In trying to find where this code is, I used firebug and selected this background image (kubrickbg-ltr.jpb). Firebug shows the following css for this #page div:

    #page {
    -moz-background-clip:border;
    -moz-background-inline-policy:continuous;
    -moz-background-origin:padding;
    background:transparent url(https://localhost/blog/wp-content/themes/feralpots/images/kubrickbg-ltr.jpg) repeat-y scroll center top;
    border:medium none;
    }

    Unfortunately Firebug locates this code as being in “blog (line 14)” — no filename. I’ve grepped for various portions of this code and cannot find where it is.

    Does anyone know what file I edit to point this background to another image ?

    Thanx, Glenn

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well what you could do is just create another entry,

    #page { background: url(/images/my-new-file-name.jpg) !important; }

    that !important will override what you had before or is set elsewhere. I sometimes do this if I need to.

    Thread Starter FeralReason

    (@feralreason)

    Thanks — that will probably do it. For that matter, I could rename my own background image so that it has this name…

    However — I hate mysteries in code that is going to run in production. I would still like to know what code, generated how, creates this line in the #page div: background:transparent url(https://localhost/blog/wp-content/themes/feralpots/images/

    Somebody out there knows ….

    In the default theme, it’s:

    <?php
    // Checks to see whether it needs a sidebar or not
    if ( empty($withcomments) && !is_single() ) {
    ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>

    in header.php.

    Thread Starter FeralReason

    (@feralreason)

    Thanks esmi — that explains why my grep turned up nothing. The filename is being created through concatenation.

    Guess if I want to modify this theme it actually DOES make sense to just change the name of my own image to kubrickbg-ltr.jpg.

    Strange ….

    Thanx again, Glenn

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modifying a Theme – What file sets the #page background ?’ is closed to new replies.