# This is post #4 of 31 in the challenge “Mastering WooCommerce”
This snippet code show you how to display total product sold quantity under product title at WooCommerce product page.
Currently your customers have no idea how many quantity or downloads have been ordered from your WooCommerce site. So in order to apply this change, you can add below code into your theme functions.php.
function tt_show_product_loop_unitsold() { global $product; $units_sold = get_post_meta( $product->id, 'total_sales', true ); echo '<p>' . sprintf( __( 'Units Sold: %s', 'woocommerce' ), $units_sold ) . '</p>'; //you can change text Units Sold to any text liked Total Downloads } add_action( 'woocommerce_single_product_summary', 'tt_show_product_loop_unitsold', 8 );

Pingback: Challenge List : 31 Ways to Customize WooCommerce | Terry Tsang : PHP Developer and Wordpress Consultant
How about product page visited or views
views : 1000
unit sold : 100
Thnks 🙂
Hi Sidiq, currently it only support unit sold record, for post view you may try other plugins that saved views. Thanks.
Hi,
Is it possible show last 30 days sold record?
Cheers!
Hi Elvin, currently it only support total sales record.
Hi,
how can I count ALL sold Products and show the number at the frontend?
Greetings
Hi Regina, you may try this free plugin by captaintheme.
https://wordpress.org/plugins/woocommerce-total-sales-shortcode/
Hi Terry,
thanks, but
I need to show how much products we sold, not how much money we earned…
hi
2 questions
– how to display for only “one product” example: id=243
– how to display only product solds over 10 item?
thanks
Hi Dear, I want the same “Display Total Product Sold Quantity to WooCommerce Product Page” but to show only on a specific product, not to show on all products.
Thank you