Created
April 30, 2014 14:51
-
-
Save nickburne/1bb04e69c11478dfc925 to your computer and use it in GitHub Desktop.
Add a background image to the shop page only in WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wp_head', 'wo_custom_shop_background' ); | |
function wo_custom_shop_background() { | |
if( is_shop() && !is_admin() ) { | |
?> | |
<style> | |
body { | |
background: url(http://blogs.smithsonianmag.com/smartnews/files/2013/08/06177001.jpg) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} | |
</style> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment