Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm seeing that a lot of sites (moz.com,hubspot.com) are using a background image as a layout. How do I add a single background image easily onto WordPress? I also want to add the layout here: http://moz.com/blog onto my blog. How do I do this?

share|improve this question
1  
"Backgroound image as layout", ehm what? –  Rarst Jun 8 '13 at 20:20
    
I want to add a background layout image kind of like Moz.com. –  DevAndy Jun 8 '13 at 20:28
1  
I am not following what you mean by "background layout" term. –  Rarst Jun 8 '13 at 20:29
add comment

2 Answers 2

up vote 0 down vote accepted

This assumes that you want to add a background image for a specific page:

Create your CSS class for the background you want.

body.custombg {background: url("images/background.gif"); }

In the header, you can use something like this to check for a specific page.

<body <?php if(is_page(123)) echo 'class="custombg"' ?>>

See Conditional Tags for more ideas of what you can do.

As for the layout of that site, you should contact them and find out if they are using a publicly available theme or if it is a custom design.

share|improve this answer
add comment

You can simply use body_class().

<body <?php body_class( is_page( 'about' ) ? 'special-class' : '' ); ?>>
share|improve this answer
    
Where do I put this? –  DevAndy Jun 12 '13 at 12:45
    
Ehm... it's a body HTML tag? Search in your template, replace it with the answers code... –  kaiser Jun 12 '13 at 13:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.