How to add a image banner to the top of the woocommerce shop base page

I am creating simple image banners on the top of each category page of my site (add category header content)

I’d like to add an image to the top of the woocommerce shop base page.
When I insert an image in the page edit screen, it does not appear.
But Woocommerce 2.x can not display the shop base page excerpt (short description)
others normal page are all show their short description.
How would I go about doing that?
I can not find page template of the woocommerce shop page

Read More

Thanks!

http://wordpress.org/extend/plugins/woocommerce/

I found it!

Insert into the top of yourtheme/woocommercer/achive-product.php

//Check is_shop - Shop base page
        // if True then Show Category Header Content of The first Product in Shop base Page 
        
if (is_shop()) {
        $args = array('taxonomy' => 'product_cat');
        $product_categories = get_categories( $args  );
        $term_id = $product_categories[0]->term_id;  
        $content = get_term_meta($term_id, 'cat_meta');
        if(isset($content[0]['cat_header'])){
            echo do_shortcode($content[0]['cat_header']);
        }
}

Hope to help someone! 🙂

Related posts

Leave a Reply

3 comments

  1. Just thought I would share how I accomplished this so easily. On your shop page click “screen options” at the upper right of the page. Checkmark “Exerpt”. Scroll down to the Exerpt box. (there will be a new box to type in there.) Here you can type in the url to your image using html. Click update to update your page. Now you will have the image or banner you want under your shop title. I also removed the title “Shop” by simply removing it from my page title on the page where you edit your shop. Then I changed the menu option in menus back to the shop title. Hope this helps someone. It sure would have helped me to know this sooner.

  2. Just create the id or class on the top where you want to add the image banner at the top and after that you just go to the admin dashboard and then.
    Apperance-> custom css and

    .your_custom_css_top {
      background-image:url('IMAGE_URL_HERE');
    }