Customizing Dara Theme

  • Author
  • #3175261

    I’m trying to remove the variable price range for my products, I have the code to insert but I need help in where to enter the code and how to save it?

    The blog I need help with is



    Hey there,

    What type of code is that you have? If it is CSS you can copy and paste this code into the CSS section of your Customizer. If you are not certain what type of code it is perhaps paste it here for us to view and we can provide further direction.

    One thing to keep in mind, the ability to use Custom CSS is a feature only available to Premium and Business plan holders. For more information on Custom CSS and how to add it to your website please refer to the following documentation:

    There are also various other forms of code, many of which have limitations to their usage on without upgraded plans. Feel free to click on the following link to learn more:

    Hope this helps,



    I’ve been adding code for various other things, but for some reason I’m not able to add this one. I am using the Dara theme.
    Please advise.

    Disable Variable Product Price Range:

    add_filter( ‘woocommerce_variable_sale_price_html’, ‘my_variation_price_format’, 10, 2 );

    add_filter( ‘woocommerce_variable_price_html’, ‘my_variation_price_format’, 10, 2 );

    function my_variation_price_format( $price, $product ) {

    // Main Price
    $prices = array( $product->get_variation_price( ‘min’, true ), $product->get_variation_price( ‘max’, true ) );
    $price = $prices[0] !== $prices[1] ? sprintf( __( ‘%1$s’, ‘woocommerce’ ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );

    // Sale Price
    $prices = array( $product->get_variation_regular_price( ‘min’, true ), $product->get_variation_regular_price( ‘max’, true ) );
    sort( $prices );
    $saleprice = $prices[0] !== $prices[1] ? sprintf( __( ‘%1$s’, ‘woocommerce’ ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );

    if ( $price !== $saleprice ) {
    $price = ‘‘ . $saleprice . ‘ <ins>’ . $price . ‘</ins>’;
    return $price;



    Hi there,

    This forum provides support for basic CSS customizations on sites only.

    What you’re trying to do is add custom PHP code to your theme. That is something completely different from CSS and we cannot help you with that here – you need a developer familiar in PHP for this type of customization. We do not provide support for this type of customization on

    While you’re modifying your theme, you can consider contacting a WooCommerce Expert for help:

    You can also look at our directory of WordPress professionals at or you can ask for advice at

The topic ‘Customizing Dara Theme’ is closed to new replies.