WooCommerce - excelling eCommerce
Remove prices from Widget/Sidebar listings (6 posts)

  1. Rican UK
    Posted 2 years ago #


    I was just wondering if its possible to remove the product prices from products listed in the sidebar, eg 'Best Sellers'.

    Thanks in advance...



  2. DeeperLook
    Posted 1 year ago #

    I'm wondering the same thing?

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    @DeeperLook: If you require assistance then, as per the Forum Welcome, please post your own topic.

  4. DeeperLook
    Posted 1 year ago #

    Hey Rican,

    I found it, go to /woocommerce/classes/widgets/ and select the widgets you wish to change.

    From there find this line of code and remove it:
    ' . $product->get_price_html() . '

    Now save and you're done. Hope this helps.


  5. Rican UK
    Posted 1 year ago #

    Hi DeeperLook,

    What will happen when I update Woocommerce? These files are likely to be replaced with the original removing my changes. Is there anyway I can copy them to my child theme so they are not replaced?

    Also, I really only want to remove the price if users are not logged in. Currently I have some code which replaces all prices with 'Login or Register to see price' if the user isn't logged in. This works fine for the main product price, but looks very messy on the best sellers list!

    If there was some code amendments I could make that only removes the price for logged out users, that would be great!

    Many thanks for this code anyway....


  6. MastroPino
    Posted 1 year ago #

    Thanks mate, simple and fast!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic