How to Add a Background Image to the Headway Theme – The Ultimate Guide

Headway makes adding a background image to your site a complete breeze. Let’s check it out.

This tutorial will assume that you upload the images to the recommended location and that you already know how to use a FTP client. If you need a tutorial on FTP, please see this article in the WordPress documentation.

How to Add a Background Image to Headway with the Visual Editor

You can upload a background image by going to site-configuration–>body–>body background imagein the headway theme visual editor.

How to Add a Repeating Background Image to Headway

It will tile across the screen and produce a repeating background pattern. Upload your image to the wp-content/themes/headway-xxx/custom/images folder and then add the following code to the bottom of your custom.css file:

/* Repeating Tiled Background Image*/
body.custom {
background-image: url('http://yoursite.com/tile-bg.jpg');
background-position: center top;
}
body.custom div#header {
background-image: url('http://yoursite.com/tile-bg.jpg');
background-position: center -30px;
}

Be sure to substitute the path to your image in the code above. This can be a relative path or a full URL.
In line #8 of the code above, the number should correspond with your Wrapper Margin dimensions (Appearance ? Headway Design ? Site size/Dimensions tab). So if your Wrapper Margin is ’10px’, line #8 should be:

background-position: center -10px;

Ta-da! You’ve now got a repeating background image on your site.

How to Add a Large Background Image to Headway

Let’s say you want to add a large background image to Headway that fades out into a color at the bottom. Upload your image to the wp-content/themes/headway/custom/images folder and then add the following code to your custom.css file:


/* Large Background Image */
body.custom {
background-image: url('http://yoursite.com/single-bg.jpg');
background-color: #fbfffe;
background-repeat: no-repeat;
background-position: center top;
}
body.custom div#header {background: none;}
body.custom div#wrapper {border: none;}

Substitute the image paths above with the path to your own image and remember to adjust the -30px value to the Wrapper Margin of your site.
This particular code tells adds a background image to the body and gets rid of the header background and the wrapper border, to make it seamless across the top.

How to Add a Fixed Large Background Image to Headway

The above code makes the background image scroll, meaning that when you scroll, it moves with the body. Let’s say you want it to stay in the same place? Simply change the above code to this:

/* Fixed Large Background Image */
body.custom {
background-image: url('http://demo.headwayhq.com/single-bg.jpg');
background-color: #fbfffe;
background-repeat: no-repeat;
background-position: center top;
background-attachment: fixed;
}
body.custom div#header {background: none;}
body.custom div#wrapper {border: none;}

How to Have a Different  Background Image for Each Page

Do you wanna get really fancy? You can add a different background for each page in Headway if you know the page ID. The page ID is found on the edit pages screen in the url. It’s the number after “&post=”. You can also figure out the ID by looking at the source with FireBug. Upload your image to wp-content/themes/headway-xxx/custom/images/ and then add the following code to your custom.css file:


body.pageid-7 {background: url(custom/images/page7.jpg);}

Make sure you change the number 7 to the ID number of the page you want to modify.

How to Add a Different Background for System Pages

You can add backgrounds to system pages easily if you know they’re classes. For example, you can add a background-image to the single posts page with the following code:


body.single {background: url(custom/images/single.jpg);}

Try It Out Yourself

If you made it this far, you should be ready to try adding background images to your own Headway site.

More resources:

You just finished reading How to Add a Background Image to the Headway Theme – The Ultimate Guide. Consider leaving a comment. Is the content out of date?
Let us know so we can update it.

http://headwayhub.com/2010/06/06/how-add-background-image-headway-theme-ultimate-guide/

Hey You! What's Powering Your Website?

No Need For WordPress Developers! Drag & Drop With Headway

Headway is a feature-rich, flexible and user-friendly WordPress theme which nearly eliminates the need for coding, and empowers average WordPress users to create unique, great looking WordPress sites.

Learn More About Headway Themes

Post comment as twitter logo facebook logo
Sort: Newest | Oldest
illanaBurk 5 pts

Just curious... is there a reason you need to upload images via the FTP (generally speaking... not just related to this tutorial), instead of just uploading them via the media upload on the WP Dash?

(and thanks BUNCHES for the rock star tutorials!)

Corey,

Thanks - your post on "How to Have a Different Background Image for Each Page" was a great help.

Marius

Hello Corey,
I'm wondering how I can add a background image to the page background "wrapper" (div#wrapper), not the "body" in the custom css. I'm trying to just add a fixed image to the page background of my home page only. Seems like the code would need the page id# I'm guessing? Let me know..

thanks!!
Marcel

To a specific page or the whole site?

body.custom div#wrapper {background: url(custom/images/wrapper.jpg);}

would be an example.

I'm actually just trying to add the background image to the home page wrapper not the whole site. is that possible?

body.custom div#wrapper pageid-7 {background: url(custom/images/wrapper.jpg);}
Would it be this simple?

thanks Corey!!
Marcel

Yeah.

body.custom.pageid-7 div#wrapper{}
OR
body.custom.home div#wrapper {}

It would be nice if the images weren't broken on this post.

I'll add it to the maintenance list, thanks.

This is so awesome, thanks Corey! I've got a site to build that totally needs this, and now I know exactly how to do it - you ROCK!

I'm glad you enjoyed the tutorial. Thanks for stopping by. :)