How to remove price of a product when it’s zero on the category and archive page?

In Woocommerce, when a product has zero price it will display ‘Free’ instead. In this tutorial we’ll learn how to remove price of a product when it is zero.

Here is what our category and archive page looks like when a product has price equal to zero.

Our team at Themelocation is comprised of WordPress developers of high expertise

  • We can maintain, support and manage your single, or all your clients, website with dedication
  • Our skills are at your disposal.

Book a Call

Shop page will look like:


The category page will look like:


And product page:


Now we want to remove ‘Free’ label on category and shop page. To do this add the following lines of code at the end of your functions.php file:


function custom_remove_loop_price(){

   global $product;





You can access functions.php file here:


Save the file after placing code.

Now refresh the category and shop page and you’ll see ‘Free’ text removed.

Shop page will be:


And category page will look like:


However ‘Free’ text will still be displayed at product page.


I hope you enjoy reading this blog post. If you want my team to do WooCommerce Maintenance for you, click here.

Leave a Comment

Your email address will not be published. Required fields are marked *