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.

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.

Editorial Staff

ThemeLocation Provides Wordpress & Woocommerce development & Customization services. Have a Project? Contact To discuss

Leave a Reply

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