// 调整分类描述顺序 奶爸建站笔记
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;
}Adjust WooCommerce Product Category Page Description Display Position
When building a website with WordPress and using WooCommerce to display products, for SEO considerations, we often add description content to product category pages to target keywords. By default, the WooCommerce category description appears below the page title. In some cases, you might not want this text content to be the first thing visitors see. We can use the following code to move the category description to display below the product list. This way, users see the product list first upon entering the site, and only see the text you added after viewing the products.
🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step instead.
「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.
👉 Learn about Website Building Coaching Service
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.