// 调整分类描述顺序 奶爸建站笔记
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;
}Adjusting the Display Position of WooCommerce Product Category Page Descriptions
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 place keywords. By default, the WooCommerce category description is displayed below the page title. In some cases, you may not want this text content to be seen by visitors immediately. We can use the following code to move the category description information to the bottom of the product list for display. This way, users will first see the product list when they enter the website, 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.
「Naibabiji WordPress Website Building Coaching Service」—From choosing a domain and buying hosting, to installing a Theme and publishing content, I「ll coach you through every step, helping you avoid detours and reach your goal directly.
👉 Learn about the 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.