Skip to content

Snippet: Display WooCommerce Category Description Above Loop

Important: There is now a setting built-into the theme in the Customizer under the WooCommerce tab.

// Display shop term description above loop
add_action( 'wp', function() {
	if ( is_tax( array( 'product_cat', 'product_tag' ) ) ) {
		add_filter( 'totaltheme/page/header/has_subheading', '__return_false' );
		add_filter( 'wpex_has_term_description_above_loop', '__return_true' );
	}
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top