woocommerce

Adjust the display position of WooCommerce product category page description

When we set up a website through WordPress and use WooCommerce to display our products, we will add descriptive content to the product category page for the sake of SEO to layout keywords.

The description of the default WooCommerce category page is displayed under the title of the page. In some cases, you may not want to show your text content to visitors at the first time. We can move the classification description information to the bottom of the product list for display through the following code, so that users will see the product list at the first sight when entering the website, and will see the text you added after viewing the product.

 //Adjust the classification description order Daddy's site building notes 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; }
3.3/5 - (7 votes)
Scroll to top