How to turn off price range in shop

Hi Guys,

Just wondering if there is a way to turn off the price range in the woocommerce shop in this theme?

See this page for example: http://newsite.vetbranding.com.au/product/dl-dental-flyers/

I would like to remove price range underneath the product heading (e.h $195.00 – $510.00 inc. GST) from all pages.

Hello there,

You can do that by adding the below CSS code to Appearance > Customize > Additional CSS from dashboard.


.single-product .entry-summary .price {
  display: none;  
}

Regards,
Kharis

Thanks Kharis, that’s perfect.

And how would I remove the price range from all of the categories? See here for example:

http://newsite.vetbranding.com.au/product-category/brochures/

Sorry Kharis, that code seems to have caused another problem. I would like to remove the price range but I would like it still to display the price once a quantity etc has been selected.

In short is it possible to remove the price range but still keep the total cost once a the product options have been selected?

Hello there,

Thank you for getting back.

Please try this code:


.single-product .entry-summary .price {
  display: none;  
}

.single-product .woocommerce-variation-price .entry-summary .price {
  display: block;  
}

Regards,
Kharis

Hi Kharis,

That still didn’t work. Both the price range and item price are being removed.

I am sorry for suggesting incorrect code. Please try this code:


.single-product .entry-summary .price {
  display: none;  
}

.single-product .entry-summary .woocommerce-variation-price .price {
  display: block; 
}

Regards,
Kharis

Is there any way to remove the price range from the category pages?

e.g. http://vetbranding.com.au/product-category/pet-sympathy-products/

Hello there,

I visited the link you shared. It looks like the price range has been removed. Do you still need an assistance with this?

Regards,
Kharis

Hi Kharis,

Please see this link http://vetbranding.com.au/products/

Hello there,

Thank you for sharing. But I don’t see any price rang on that product archive page. Maybe you want to remove of which underneath the product item like this one?

Cloudup

Regards,
Kharis

Yes, that’s what I would like to remove.

Hello there,

To accomplish it, you’ll need to add this custom PHP function to your child theme’s functions.php file.


add_filter('woocommerce_variable_price_html', 'sydney_pro_child_product_variation_price', 10, 2);
function sydney_pro_child_product_variation_price( $price, $product ) {
  $price = wc_price($product->get_price());
  return $price;
}

Or you can apply this code with the functionality plugin like Code Snippets without a child theme.

Regards,
Kharis