
When we build a website with WordPress and use WooCommerce to display products, for SEO purposes, we add description content to product category pages to layout keywords.
The default WooCommerce category page description is displayed below the page title. In some cases, you may not want this text to be the first thing visitors see. We can use the following code to move the category description to the bottom of the product list, so users first see the product list when entering the site, and only see the text you added after browsing the products.
// 调整分类描述顺序 奶爸建站笔记
add_action('woocommerce_archive_description', 'custom_archive_description', 2 );
function custom_archive_description(){
if( is_product_category() ) :
remove_action('woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 10 );
endif;
}