diff --git a/woocommerce-template.php b/woocommerce-template.php index 8e370b1cc2f..823db71d6c7 100644 --- a/woocommerce-template.php +++ b/woocommerce-template.php @@ -15,62 +15,62 @@ if (!function_exists('woocommerce_content')) { // This function is only used in the optional 'woocommerce.php' template // people can add to their themes to add basic woocommerce support. function woocommerce_content() { - global $woocommerce; - - if ( is_single() && get_post_type() == 'product' ) + if ( is_singular('product') ) woocommerce_single_product_content(); - elseif ( is_tax('product_cat') ) - woocommerce_product_taxonomy_content(); - elseif ( is_tax('product_tag') ) + elseif ( is_tax('product_cat') || is_tax('product_tag') ) woocommerce_product_taxonomy_content(); else woocommerce_archive_product_content(); } } if (!function_exists('woocommerce_archive_product_content')) { - function woocommerce_archive_product_content() { ?> + function woocommerce_archive_product_content() { - post_title; - ?> + if (!is_search()) : + $shop_page = get_post( woocommerce_get_page_id('shop') ); + $shop_page_title = apply_filters('the_title', (get_option('woocommerce_shop_page_title')) ? get_option('woocommerce_shop_page_title') : $shop_page->post_title); + $shop_page_content = $shop_page->post_content; + else : + $shop_page_title = __('Search Results:', 'woocommerce') . ' “' . get_search_query() . '”'; + if (get_query_var('paged')) $shop_page_title .= ' — ' . __('Page', 'woocommerce') . ' ' . get_query_var('paged'); + $shop_page_content = ''; + endif; - -