Skip to content

Commit

Permalink
Prevent empty term-description div
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertDD committed Dec 28, 2012
1 parent 187f41b commit e008ba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions woocommerce-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ function woocommerce_product_loop_end( $echo = true ) {
* @return void
*/
function woocommerce_taxonomy_archive_description() {
if ( is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) == 0 )
echo '<div class="term-description">' . wpautop( wptexturize( term_description() ) ) . '</div>';
$term_description = term_description();
if ( $term_description && is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) == 0 )
echo '<div class="term-description">' . wpautop( wptexturize( $term_description ) ) . '</div>';
}
}
if ( ! function_exists( 'woocommerce_product_archive_description' ) ) {
Expand Down

0 comments on commit e008ba1

Please sign in to comment.