Cutline Theme for WordPress

One Giant Leap for Mankind

Cutline Theme for WordPress random header image

Using Static Header Images in Cutline Version 1.3

August 7th, 2008 · 14 Comments

The more recent versions of the Cutline Theme use a dynamic header image, which is based on what kind of page a blog is currently showing. At present, for version 1.3 there are five default images that can be found under the /images folder as header_x.jpg (where x = 1 to 5), which rotate in random.

I’ve received several inqiuries on how to set a static page instead, either just to set one of these images as the sole static image, or to replace it with another one–perhaps an image with the blog title or a corporate/brand header image perhaps.

One solution would be to rename the image you want as the single static header image to header_1.jpg, header_2.jpg, header_3.jpg, header_4.jpg and header_5.jpg and upload these into the /images folder. That would take some space, though. While this is negligible for most people, the few milliseconds processing time it takes for the server to randomize from 1 to 5 might be a concern if you run a site with huge traffic.

The better way to do it would be to access the header file header.php from either FTP or the WordPress theme editor, and look for these lines below:


<div id="header_img">
<img src="<?php bloginfo('template_url'); ?>/images/header_<?php echo(rand(1,5)); ?>.jpg" width="770" height="140" alt="<?php bloginfo('name'); ?> random header image" title="<?php bloginfo('name'); ?> random header image" />
</div>

You will notice the part that says header_<?php echo(rand(1,5)); ?>.jpg which outputs a random integer from 1 to 5. If you wish to set any of the five built-in images as the sole static images, just replace header_<?php echo(rand(1,5)); ?>.jpg with header_X.jpg with X being the number of the image file name of your choice.

Or if you’ve already uploaded your custom header image onto the /images folder (prescribed dimensions are 770 x 140 px), you can just simply replace the entire thing with the filename of your image.

Do you like this article? Submit it to Blogosphere News!

Tags: Cutline Mods

14 responses so far ↓

  • 1 Angie // Aug 8, 2008 at 7:38 pm

    I am in the process of changing the theme of my blog and will use this Cutline theme however I don’t understand the instructions above about changing the graphic. I will have a header that I would like to use but the size is 770 x 122. Can I use that and if so, what is the exact code that I need to replace with the image filename?

    If you can help me, it would be greatly appreciated.

  • 2 Angie // Aug 9, 2008 at 12:19 pm

    Just wanted to quickly update you that we got it to work. Thanks

  • 3 “FOREXкуб” - Комплексное Обучение Биржевой Торговле XXI века! // Aug 10, 2008 at 6:25 am

    [...] Using Static Header Images in Cutline Version 1.3 [...]

  • 4 Joel // Aug 11, 2008 at 12:18 pm

    Hello,
    I’m working on a significant modification of the Cutline 1.3 theme and I must tell you that it’s a pleasure to have such a powerful foundation to work off of. However, I have run into a painful roadblock…largely due to my lack of PHP knowledge.

    Can someone help me use the wp_list_pages function with a dynamic meta_value parameter? I need the pages to match the meta_value for meta_key=’County’.

    Click here for a full explanation of my issue.

    Many thanks to anyone who can help!

    Best,
    Joel

  • 5 Joel // Aug 12, 2008 at 10:27 pm

    Here’s the link (don’t think the one I posted above worked): http://wordpress.org/support/topic/195502

  • 6 Cheryl // Aug 13, 2008 at 5:49 pm

    I published a post (3) last night and checked it this morning and all of a sudden on my home
    page my right sidebar is gone. However, when you go to ‘read more’ on all posts the right sidebar is there. Also my font size has automatically changed about 4 postings ago. It all happened after these posts last evening. Help! I’ve spent about 2 hours changing things to see if that could be the problem but it’s still not working right. I really like this theme and this is the first problem I’ve had.
    And suggestions?? Thanks.
    Cheryl
    http://www.homesecurity911.com

  • 7 Cutline Moderator // Aug 19, 2008 at 11:26 am

    Hi Joel,

    Your link doesn’t seem to work. Can you email it to me privately, so I can check it out - jangelo (at) splashpress.com.

    Hello Cheryl,

    Most likely you have one post that has missing closing tags, like DIV, etc. Does the problem appear in static pages or just in homepage?

  • 8 Cutline Moderator // Aug 19, 2008 at 11:40 am

    Angie, you can use an image that is not as tall as the default one, yes. Simply replace the filename stated in img src=”" with the image you’ve uploaded. Ideally this will be under the /images/ folder.

  • 9 Aghper // Aug 26, 2008 at 9:24 am

    I would like to know how I can add logo on the right side of the column,thank you

  • 10 ION CLEANSE // Sep 1, 2008 at 5:13 am

    It all happened after these posts last evening. Help! I’ve spent about 2 hours changing things to see if that could be the problem but it’s still not working right.

  • 11 Ganesh // Sep 12, 2008 at 10:32 am

    Hi. How can I change the comment form? The border for the boxes in the comment form’s left and bottom edges seem to be invisible. How can I make it look visible?

  • 12 carol // Sep 19, 2008 at 9:18 am

    How do you get that thick black line above the header image? I downloaded the theme and looked through the header and index code and don’t see anything there, and nothing on the original images.

  • 13 Cuckoo // Oct 2, 2008 at 3:35 am

    I have changed the header images w/o any help.

    I have 3 blogs and all three have different header sets, navigation bars above/below the image etc.

  • 14 Впереди паровоза 3G - Открытые системы // Nov 13, 2008 at 5:54 am

    [...] Using Static Header Images in Cutline Version 1.3 [...]

Leave a Comment