A Rant about the WordPress Default Kubrick Theme

It looks crisp and clean, it works well as a blog layout and appears to faultlessly embody WordPress.

It even allows you to easily change header background and text colours, within the Admin… Presentation… section. 

If all you want to do is use it, the Default Kubrick theme which comes with WordPress is ideal.

But what if you want to tailor it a little?  You might be familiar with CSS and want to change the look.  You might even know a little code and feel confident about making a few changes to the templates.  Well, BEWARE!

One of the first things you might want to do, to give this your own look, is to change that header.  The WordPress documentation gives you confidence to do this, there’s a handy page called Designing Headers, which gives some great, detailed instructions on how to do this.  There’s just one problem – for the Default Kubrick theme, it just doesn’t work!

Designing Headers tells us

“The styles for the header image for the Default or Kubrick WordPress Theme, and any Theme based upon that Theme, are more complicated to change than those for the Classic Theme. The styles are found within the styles in the header.php “head” section, as well as in the styles.css.

“To change the image file, replace the “kubrickheader.jpg” with the name of the new graphic image you have uploaded to your site to replace it. If it is in a different directory, change that by replacing the bloginfo() tag with the specific address of the graphic’s location.

“If you are using an image that is the same size, then simply replace the image. If it is a different size, fill in the height and width of the image in the next section called #headerimg. “

Just one problem – the Default Kubrick theme does something ELSE – it creates another style tag “on the fly” using the header-img.php script and inserts this into your page before it is displayed – this has the effect of replacing the background of the #headerimg tag with an image created by a set of colours entered in WordPress admin (or the default colours) and overwrites any image you may store in kubrickheader.jpg!!!

Maybe there is some more documentation which describes this unusual feature but I’ve not come upon it yet.  And that is what’s lacking.  Maybe this feature is familiar to all those who have been with WordPress since the beginning and dedicatedly follow all its forums.  But that doesn’t help those of us who have lately discovered WordPress and are exploring and learning, trying to see how easily it can be tailored to what we want.  Certainly I’m not the only person who is frustrated by this – see here.

So, here’s how to overcome this problem and display the header image you want within the Default Kubrick Theme:

This was my original solution:

Edit the functions.php file – choose Appearance.. Editor.. and then click on the Theme Functions (functions.php) file in the list on the right.

Scroll down until you see this line:-

add_action('wp_head', 'kubrick_head');

then comment it out by adding two slashes as below:-

//add_action('wp_head', 'kubrick_head');

Save your changes by clicking on Update File and you’re done. This will stop the creation of the extra style tag which overrides your new image.

However,  it seems that there is a simpler way. 

Go into “Presentation” -> “Header Image and Color” in the control panel.

Then click on the “Advanced” button.
Then click on the “Select Default colors” button.

This seems to get rid of the extra style tag within the header and allows your chosen image to display.  So it seems that this problem only occurs for people who have been fiddling with the colour choices…. and then can’t work out how to get back to the original colour settings, which don’t implement an overriding style tag.

Once the overriding colour choice style tag has gone, you can edit style.css as described in Designing Headers and your new chosen header image should now appear!

 I’ve now changed my theme but here is a website which uses the Default theme, with the header image changed.

Special Layout for one Category

I want to set up a template specifically for the Growing a Website category, which shows items in date order (oldest first) rather than reverse date order (newest first). First, I need to create a category template with the name category-n.php (where n is the numeric id of the particular category, found by looking at the […]

WordPress Functions

Getting to grips with WordPress functions seems to be the only real way into understanding WordPress enough to be comfortable creating and modifying templates, as I want to do. The Function Reference seems a handy link to remember but the Search function rarely seems to find it (perhaps because it’s incomplete), so here is the […]

Early next steps

A few things I want to test and do on this website: Edit the templates – single, archive, category, post(?) to make the layout more like I want. In particular, I want to remove references to comments and “posted by” and just show which category something is in (and also, perhaps, date and time).  Done, for […]

The Home Page

Now it’s time to get the look and the layout of the home page just right.  The home page can be static, in that its content can be changed by editing via the admin section only, or it can be dynamic, in that all or part of it can be updated whenever a post is added […]

Plugins

These are the Plugins which I think will be most useful for my “typical” website. Maintenance mode – a handy option which allows you to display a polite “website unavailable” message to visitors, while still allowing signed-in administrators access to view the website. Visualize Advanced Features – provides additional editing buttons to users using the visual […]

Get the Look

Get the look right.  Hopefully you have some kind of look – colours, fonts – in mind and ideally a header image, even a logo. Select a likely theme as a basis.  See Using Themes and Theme Development for reference. Work on the style.css and header.php and footer.php files to get the fonts, colours, layout and header […]

Updateable Home Page

What I want is an updateable home page and a set of subsidiary pages, including a subsidiary blog (with the typical blog front page). It seems that this combination is not formally supported within WordPress.  So, there are a few options I can choose from: Use the WordPress blog home page as my home page and modify […]

Growing a website – Day 6

Aiming for this structure for my “typical” website:- Updatable home page – top level Other “static” pages such as about, contact, links, services – these are the second level items Perhaps some sub-pages to the static pages, such as detail about individual services – these would be third level Blog – also a second level […]

Growing a website – day 5

If you have been following these posts, you’ll have seen that my home page has looked rather fragmented for a day. I have been experimenting with the layout:- copying a theme and then modifying it for my own use creating a new home page template, based on the index page but modified creating a new footer creating a […]