Setting Background Images in the Thesis Theme for WordPress
on July 13, 2011
Adding a background image is a nice way to customize and add some style to your site or blog. If you are using the Thesis Theme for WordPress it is also fairly simple and straightforward. Just follow the steps below:
1) Upload the Background Image to WordPress
You can upload via FTP or by logging in to WP Admin > Media > Add New > Upload
Note the location / URL of the background image for later.
2) Edit the Stylesheet:
Go to Thesis > Custom File Editor > Edit custom.css
Paste the below code into the editor edit it to reflect the URL the background image:
/* to set background image */
body.custom {
background: url('INSERT_BACKGROUND_IMAGE_URL_HERE');
}
Note: Make sure not to delete the single quotes or parentheses around the URL.
3) Refresh your site
The new background will appear.
Note: You may have to clear your cache as well
Congratulations on your new background!
I had no idea that it was this simple. Thanks for the short and sweet Thesis theme tutorial. Implementing it on my blogs in 3..2..1!
I didn’t find my desired result.My background turns into white instead of having a bg image. it’s already uploaded on the server.
What’s the URL of your background image?
Thanks mate, great and very simple explanation. Already googled for 1 hour before I found your site. All the other codes did not work 🙂
Hi
I didn’t get the result either – just a white background. Any tips?
Thanks
Amanda
What is your background image URL?
than you very much ! this is what I’ve looking for .. Great tips ,, !
You’re welcome. Glad you found it to be helpful.
Thanks It worked 🙂
The image is really there – http://www.cfink.com/wp-content/uploads/2012/02/background.jpg
But it’s not showing up.This is the code:
/* to set background image */
body.custom {
background: url(‘http://www.cfink.com/wp-content/uploads/2012/02/background.jpg’);
}
What am I doing wrong.
Hi Cyndi, are you sure you have the code in the right place? When I visit cfink.com I do not see it in the CSS. I do see the background image.
It’s in my custom.css folder. This is the code. You see an image? I don’t see an image. Thanks for you help.
/*
File: custom.css
Description: Custom styles for Thesis
BASIC USAGE:
If you have enabled the custom stylesheet in the Thesis options panel, the tag
will be appended with the “custom” class, like so: . You can use
the “custom” class to override *any* CSS declarations contained in the style.css file.
For example, if you wish to change the default link color to green, you would add the
following declarations to this file:
.custom a, .custom a:visited { color: #090; } <— This makes links green
.custom a:hover { color: #00f; } <— This makes links blue when you mouse over them
WHY THIS WORKS:
By using the "custom" class, you are creating more specific CSS declarations for HTML
elements. CSS styling is applied through rules of specificity, and because declarations
prepended with .custom are more specific, they get applied when the page is rendered!
More information about styling your Thesis installation using this file can be found
in the User's Guide:
http://diythemes.com/thesis/rtfm/customizing-thesis-with-customcss/
Site Design and coding by Jamie Varon of Shatterboxx Media (www.shatterboxx.com) March, 2010
*/
.menu, .menu a, .menu li ul { border-color: white; }
.menu, .menu a, .menu li ul {
border: none;
}
/* to set background image */
body.custom {
background: url('http://www.cfink.com/wp-content/uploads/2012/02/background.jpg');
}
The odd thing is that the custom.css file, in Thesis 1.8.3, seems to have disappeared. Have you noticed this? I just sent a tweet to Chris Pearson to ask this question.
Hi Cyndi, it’s a bit tough for me to tell from the code you posted in your comments (not all the formatting was preserved). Can you send us a copy of the actual custom.css file?
My site is not live yet..far from it. THANK YOU for an easy way and clear instructions for a newbie to get an image up! I must have searched for hours until I found your site. My only question is, what is the size my image should be to have it look like yours on here? My site is duplicating the castle on the left of my site and putting it on the right as well. Basically I want a castle on the left and its mirror image on the right, almost like bookends. I’m thinking the sizing of the pic is wrong or something bc the file I uploaded is correct. Thanks!
You’re welcome. We’re happy to help with your question, but will need to be able to see the site. Can you take maintenance mode down or email us how to access?
I give up, I’ve gone through 4 tutorials on thesis background image and none work…just get a white background 🙁 Thesis is such a pain in the ass and a huge waste of time.
What is the code that you are using in your custom.css file?
how do you keep the image from tiling and moving when you scroll? i want it to be static like your photo..
You can set the background to behave this way with some custom CSS. If you need further help, please contact us.
“You can set the background to behave this way with some custom CSS. If you need further help, please contact us.”
What is the custom CSS needed to do this?
Could you explain here or send me an email please?
Thanks!
Just sent an email re: further info.
Amazingly simple. Gosh a lot of info out there makes it seem so complicated
Glad to here that this tutorial was of help for you!
How do you get a background image to stay static and not scroll?
It can be done with some custom CSS. If you’d like assistance, please drop us an email and we’ll be glad to help.
Awesome
Simple and easy to follow – worked first time
Thanks
You’re welcome!
I did get an image on background and then I couldn’t get rid of it. I deleted it from photobucket and then it left images saying deleted image etc. What a mess. I can’t find the ftp file to delete it either. There must be a way out??
Just remove the CSS. Deleting the image on photobucket won’t solve any issues and for that matter, why are you using a background from photobucket? Save it and upload it to your media folder.
I’ve had this working for years but with the new update it seems to have reverted to a purple (default) background. Also lost the white hover over the nav menu. Any ideas? I didn’t change any code, and the stuff you list lives under the “Custom CSS” tab of the Thesis page in WordPress. Thanks in advance!
Hi Bryan, it looks like the body class changed during the update, which is why the background image isn’t showing for you anymore. Try changing
body.custom
tobody.template-front
in the code and the background image should start showing again. Complete code shown below:body.template-front {
background: url('INSERT_BACKGROUND_IMAGE_URL_HERE');
}