From e008ba1ad3cdadb28791d9294d5c7955ede5cb45 Mon Sep 17 00:00:00 2001 From: Geert De Deckere Date: Fri, 28 Dec 2012 19:36:03 +0100 Subject: [PATCH] Prevent empty term-description div --- woocommerce-template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/woocommerce-template.php b/woocommerce-template.php index df6d46afc8d..c719ac984f2 100644 --- a/woocommerce-template.php +++ b/woocommerce-template.php @@ -291,8 +291,9 @@ if ( ! function_exists( 'woocommerce_taxonomy_archive_description' ) ) { * @return void */ function woocommerce_taxonomy_archive_description() { - if ( is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) == 0 ) - echo '
' . wpautop( wptexturize( term_description() ) ) . '
'; + $term_description = term_description(); + if ( $term_description && is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) == 0 ) + echo '
' . wpautop( wptexturize( $term_description ) ) . '
'; } } if ( ! function_exists( 'woocommerce_product_archive_description' ) ) {