Cutline Theme for WordPress

One Giant Leap for Mankind

Cutline Theme for WordPress header image 2

Using Static Header Images in Cutline Version 1.3

August 7th, 2008 · 18 Comments · Cutline Mods

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.

Tags: ···


18 Comments so far ↓

  • Angie

    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.

  • Angie

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

  • Joel

    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

  • Joel

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

  • Cheryl

    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

  • Cutline Moderator

    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?

  • Cutline Moderator

    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.

  • Aghper

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

  • ION CLEANSE

    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.

  • Ganesh

    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?

  • carol

    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.

  • Cuckoo

    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.

  • Впереди паровоза 3G - Открытые системы

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

  • Tim Glase

    I’ve customized my entire Cutline theme on my own. However, I’m at a loss of what to do with my header navigation.

    I put my logo image in place of the “Front Page” link. I like this approach, but my other page links do not align with the image.

    How do I center the header navigation links? I want to center them horizontally, not vertically. I’d even settle for aligning the page links (About, Editor, etc.) at the bottom of the space.

    Any help is appreciated.

    Tim

  • Tim Glase

    Never mind… I used a trick… Everything in my nav bar is an image…

  • Cuckoo

    Hi Tim,

    Can you pls give us the url where you have used all these ?

  • Ian

    Hi,

    I use the cutline theme for my podbean podcast site (http://hellomynameis.podbean.com) and as wondering if there was any way to change the background inamge to something different, for example could I link it to a wallpaper I have on Photobucket?

    Thanks

Leave a Comment (Need help? Visit our Support page and Forums first.)