• Resolved jessamca11

    (@jessamca11)


    Hello, I am using the following CSS to remove the prices on my sold listings.

    .outofstock .price{display:none}

    .outofstock .amount{display:none}

    It worked for the prices, however it still has the currency.

    Could someone help me on how to remove this?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • In your custom css line 255, change:

    .woocommerce ul.products li.product .price {
        display: flex !important;
    }
    
    to
    
    .woocommerce ul.products li.product.instock .price {
        display: flex !important;
    }

    then change your custom css to:

    
    .product_after_shop_loop .outofstock .price,
    .woocommerce ul.products li.product.outofstock .price,
    .wp-block-getbowtied-carousel ul.products li.product.outofstock .price {
        display: none;
    }

    I don’t think you’ll need a style for the .amount because that will be controlled by the .price style.

    Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hi @jessamca11 ,

    Thanks for reaching out!

    I understand that you would like to hide the currency and price for items that are Out of stock on your site, is this correct?

    Should the CSS above not work as expected on your end, you can have a look at the following article which provides custom code on how to achieve this:

    I’d strongly suggest using a plugin that allows custom functions to be added to your site, such as the free Code Snippets plugin, rather than adding any code directly to your functions.php file.

    Cheers!

    Thread Starter jessamca11

    (@jessamca11)

    Thank you! That first code works great.

    The price still shows when you open a sold listing – does anyone know how to remove that price as well?

    Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hi @jessamca11 ,

    The price still shows when you open a sold listing – does anyone know how to remove that price as well?

    After testing the code snippet provided in the article previously shared, I am able to see that the price is also removed when opening an out of stock product.

    Here is the outcome after adding the code snippet to my test site:

    Out of Stock product on Shop page:

    Out of Stock product on single product page:

    Hope this helps!

    Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – feel free to create a new topic if you need any further help.

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘remove price and currency on sold listings’ is closed to new replies.