Tagged: background image, contact page
Is there a way to set a custom background image for individual pages on the site?
As an example: can we set a background image for the contact page?
Hi rednovaMeUp!
In WordPress dashboard, please go to Appearance > Editor and open Header.php file and find
<html <?php language_attributes(); ?> class="<?php echo " html_$style ".$responsive." ".$headerS;?> ">
and change it to
<html <?php language_attributes(); ?> class="<?php echo " html_$style ".$responsive." ".$headerS;?> " style="<?php if(!is_page(1167)) { echo 'background: none;'; } ?>">
I assume that you are using boxed layout with background image
Regards,
Yigit
OK, I’ve added that, but how would I now add a background image for a page?
As an example: How would I add a background image for the Contact Page?
http://rednovamedia.com/arabella/contact/
I appreciate your help!
Hey!
This code will display background image only on Contact page if you are using Boxed Layout with Bacground image http://i.imgur.com/l1W8Dtk.jpg
If this is not what you would like to achieve, please undo changes i posted in my previous post and add following code to Quick CSS in Enfold theme options under Styling tab
.page-id-1167 .container_wrap { background-image: url("https://rednovamedia.com/arabella/wp-content/uploads/2013/06/Arabella_Logo_Tableau_01-1500x975.jpg"); }
You should simply change the link to your background image
Regards,
Yigit
Thank you Yigit!
That second option works perfectly.
I can also see now how to get the page id for any page to add a custom background to it.
Thank you very much!