Opened 5 years ago
Closed 4 years ago
#7121 closed defect (bug) (fixed)
Wordpress default theme does not use correct background
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | General | Version: | 2.5.1 |
| Severity: | minor | Keywords: | has-patch tested |
| Cc: | christmasboy_81@…, dragos.nicholas@… |
Description
In 2.5 and 2.5.1, for the main page, the default theme (kubrick) uses kubrickbgwide.jpg for the background and not kubrickbg-ltr.jpg, like it should.
I did some research and the problem is in wp-content/themes/default/header.php and was broken in revision 6711, which was to fix ticket 3155.
The offending line is 17 and is currently
if ( !empty($withcomments) && !is_single() ) {
In the previous revision (6195) it was
if ( !$withcomments && !is_single() ) {
I think the correct change would be the following (although I know hardly anything about PHP or wordpress)
if ( empty($withcomments) && !is_single() ) {
This problem has been reported several times on the wordpress support forums. http://wordpress.org/support/topic/167648?replies=5 http://wordpress.org/support/topic/165580?replies=1 http://wordpress.org/support/topic/178600?replies=2
Attachments (1)
Change History (9)
comment:1
christmasboy81 — 5 years ago
- Summary changed from Wordpress default theme does use correct background to Wordpress default theme does not use correct background
This bug doesn't seem to be existent with r8071.. my background is loaded from /wp-content/themes/default/images/kubrickbgcolor.jpg .
comment:3
in reply to:
↑ 2
christmasboy81 — 5 years ago
Replying to hansengel:
This bug doesn't seem to be existent with r8071.. my background is loaded from /wp-content/themes/default/images/kubrickbgcolor.jpg .
Sorry, this is related to the page background (where the content is), and not the body background.
The full code from header.php is:
15 <?php
16 // Checks to see whether it needs a sidebar or not
17 if ( !empty($withcomments) && !is_single() ) {
18 ?>
19 #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
20 <?php } else { // No sidebar ?>
21 #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
22 <?php } ?>
The result is that the entire body is the color of kubrickbgwide.jpg. kubrickbg-ltr.jpg has a colored area for the sidebar.
comment:4
christmasboy81 — 5 years ago
- Milestone changed from 2.5.2 to 2.6
- Milestone changed from 2.9 to 2.8
- Owner changed from anonymous to seth
- Status changed from new to assigned
comment:7
Nicholas91 — 4 years ago
- Cc dragos.nicholas@… added
- Keywords tested added
- Owner changed from seth to Nicholas91
- Status changed from assigned to new
Tested on Ubuntu/Firefox + Opera. The background uses the correct jpg file.

The title of the ticket should be "Wordpress default theme does not use correct background.
Sorry about that.