Hi,
it works! Thank you 🙂
Maybe you can help me with another Problem. I use this shortcode for listing the rooms [hotelier_listing]. I would like to sort the rooms according to the number of guests or the Price. The high values first.
Thank you!
Hi,
In “Hotelier > Settings > Rooms & reservations > Listing settings > Default room sorting” you have the option to sort the rooms by the menu order. The menu order is an attribute that appears on the right when you edit a room (“Page Attributes” on the right, below the publish button).
Use that attribute to sort your rooms manually (0, 1, 2, etc).
If you need to alter the order dynamically, you need to filter the query yourself (I can’t help you with the code). There is a filter:
https://github.com/easy-wp-hotelier/wp-hotelier/blob/master/includes/htl-room-functions.php#L325
You can alter the query and add your preferred parameters.
https://developer.ww.wp.xz.cn/reference/classes/wp_query/