add header image to woocomerce shop page

Solutions on MaxInterview for add header image to woocomerce shop page by the best coders in the world

showing results for - "add header image to woocomerce shop page"
Declan
17 Apr 2017
1//Check is_shop - Shop base page
2        // if True then Show Category Header Content of The first Product in Shop base Page 
3        
4if (is_shop()) {
5        $args = array('taxonomy' => 'product_cat');
6        $product_categories = get_categories( $args  );
7        $term_id = $product_categories[0]->term_id;  
8        $content = get_term_meta($term_id, 'cat_meta');
9        if(isset($content[0]['cat_header'])){
10            echo do_shortcode($content[0]['cat_header']);
11        }
12}
13