Merge pull request #11523 from webmandesign/patch-1

Don't display the archive description on search results page
This commit is contained in:
Mike Jolley 2016-07-25 12:58:20 +01:00 committed by GitHub
commit fabf35872f
1 changed files with 5 additions and 0 deletions

View File

@ -602,6 +602,11 @@ if ( ! function_exists( 'woocommerce_product_archive_description' ) ) {
* @subpackage Archives
*/
function woocommerce_product_archive_description() {
// Don't display the description on search results page
if ( is_search() ) {
return;
}
if ( is_post_type_archive( 'product' ) && 0 === absint( get_query_var( 'paged' ) ) ) {
$shop_page = get_post( wc_get_page_id( 'shop' ) );
if ( $shop_page ) {