/** * The Template for displaying product archives, including the main shop page which is a post type archive. * * Override this template by copying it to yourtheme/woocommerce/archive-product.php * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly $category_header_src = ""; if (function_exists('woocommerce_get_header_image_url')) { $category_header_src = woocommerce_get_header_image_url(); } get_header('shop'); ?> <div id="primary" class="content-area"> <div class="category_header <?php if ($category_header_src != "") { ?> with_featured_img<?php } ?> " style="background-image:url(<?php echo $category_header_src; ?>
function show_category_header() { $category_header_src = woocommerce_get_header_image_url(); //echo ($category_header_src!="") ? '<div class="woocommerce_category_header_image"><img src="'.$category_header_src.'" style="width:100%; height:auto; margin:0 0 20px 0" /></div>' : ""; }