Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'wp_head', 'sk_customizer_css' );
- /**
- * Writes the Home Top background image out to the 'head' element of the document
- * by reading the value from the theme mod value in the options table.
- */
- function sk_customizer_css() {
- ?>
- <style type="text/css">
- <?php
- $sk_home_top_background_image_url = wp_get_attachment_url( get_theme_mod( 'sk_home_top_background_image' ) );
- if ( 0 < count( strlen( ( $sk_home_top_background_image_url ) ) ) ) { ?>
- .home-top {
- background-image: url( <?php echo $sk_home_top_background_image_url; ?> );
- }
- <?php } // end if ?>
- </style>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement