wp_head(); ?> </head> <body <?php body_class(); ?> > <div id="page" class="hfeed site"> <?php do_action('buttercream_before'); ?> <?php //If we're using a custom header that is not the default, use a custom prefix $buttercream_header_image = get_header_image(); if (false == buttercream_is_a_default_header()) { $buttercream_custom = 'custom-'; } else { $buttercream_custom = ''; } ?> <?php if (!empty($buttercream_header_image)) { ?> <div id="<?php echo $buttercream_custom; ?> header-image"> <a href="<?php echo esc_url(home_url('/')); ?>
function buttercream_alternate_default_headers() { $buttercream_current_header = get_header_image(); $buttercream_current_header_style = basename($buttercream_current_header, '.png'); if (isset($buttercream_current_header_style) && true == buttercream_is_a_default_header()) { ?> <style type="text/css"> #header-imagesm { background-image:url('<?php echo get_template_directory_uri(); ?> /img/<?php echo $buttercream_current_header_style; ?> -sm.png'); } .bluebar { background-image:url('<?php echo get_template_directory_uri(); ?> /img/bar-<?php echo $buttercream_current_header_style; ?> .png'); } @media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) { #header-image img { background-image:url('<?php echo get_template_directory_uri(); ?> /img/<?php echo $buttercream_current_header_style; ?> @2x.png'); background-repeat: no-repeat; background-size: 850px 265px; padding-right: 9999px; background-position: 9999px; margin-left: -9999px; } #header-imagesm { background-image:url('<?php echo get_template_directory_uri(); ?> /img/<?php echo $buttercream_current_header_style; ?> -sm@2x.png'); background-size: 200px auto; } } </style> <?php } else { $buttercream_options = buttercream_get_theme_options(); $buttercream_style = $buttercream_options['theme_style']; ?> <style type="text/css"> #header-imagesm { background-image:url('<?php echo get_template_directory_uri(); ?> /img/<?php echo $buttercream_style; ?> -sm.png'); } .bluebar { background-image:url('<?php echo get_template_directory_uri(); ?> /img/bar-<?php echo $buttercream_style; ?> .png'); } </style> <?php } }