Snippet: Move WooCommerce Product Category Description Below Products
By default in the Total theme all category/term descriptions display in the main page header title area as the subheading. However, it's very easy to move. The following snippet can be used to move the category description for WooCommerce products from the subheading to below the products.
add_action( 'init', function() {
// Disable subheading on product cats
add_filter( 'totaltheme/page/header/has_subheading', function( $check ) {
if ( is_tax( 'product_cat' ) ) {
$check = false;
}
return $check;
} );
// Display description below loop
add_action( 'wpex_hook_content_bottom', function( $bool ) {
if ( is_tax( 'product_cat' ) ) {
get_template_part( 'partials/term-description' );
}
} );
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend WPCode)