Price display format for marketplace listings

I’m adding this snippet:: Change the price display format for marketplace listings #hivepress #marketplace · GitHub to functions.php in the child theme I have created.

I am assuming that I can change the way the price on my listings is displayed. At the moment the default Rentalhive price listitig display is price per day as per my screeshot:

I would like to be able to change this to something like “R1750 base price / day”. I have set up time variable pricing with discounts for longer stays so the price varies over time.

Using the abovementioned snippet does not seem to have any effect: If I were to paste the snippet as is it should change the price displayed to “R1750 / item”, correct?

I have successfully implemented one of your other code snippets to increase the maximum image uploads from 10 to 35 so I think I am using the snippets correctly.

Hi,

If you mean that the PHP snippet to change the display does not work, please note that if you have the Bookings extension installed, you need to use this PHP snippet: Change the price display format for bookable listings #hivepress #listings #bookings · GitHub
But if you mean different formats depending on listing discounts, then unfortunately, there is no simple snippet, it will require a custom implementation.

Hey, it worked! I am indeed using the booking extension. Now I can indicate an average rental price per day in the listing block or page but the potential guest will get an accurate price when they actually input real dates in the calendar. If it is summer or peak season the daily rate will be higher than the “average” and conversely off-peak and winter rates will be less than “average”. I think Airbnb does it in a kind of similar way.

See the screenshot below for how the listing looks after inserting and editing your code snippet in the functions.php of my child theme. Thanks for the great help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.