Changing the "sort by" function so it stays up when clicking on it

1. We would like the “sort by…” to stay up when you click on it instead of it being a click and drag, where you have to hold it in for it to stay up.

2. We would like to remove these two that or on a page that shows up when you’re about to book a listing.

Thanks.

  1. Please try checking this drop-down as a regular user, it should stay visible without dragging (this issue is most likely caused by a plugin that loads the same drop-down script as HivePress, or by the admin toolbar margin)

  2. Please try this snippet to delete Note field Hide the booking note field #hivepress #bookings · GitHub
    Also, in this way you can delete other fields in this form just by changing note on your attribute field name

The first snippet worked removing the “notes” field.
When using it for the other field it created a bug that affected the dates.

If you mean removing the Start/End Date fields unfortunately there’s no easy way to do this, these fields are required for bookings.

No, I mean that this happens when you remove the last field.
when you remove the field where it says “0”

Then this happens:

So the issue is that we want the dates to be shown like it is in the first picture. We want to change the field where it says “0” which we now have, but something happened with the dates.

Thanks in advance!

If possible share more details, is this field is a custom booking attribute or it’s the booking Guests field added automatically? You can also share the snippet you tried to hide it.

We didn’t add these fields, this field was already here from the beginning, as well as the “notes” field. It is shown in this picture:

We got this snippet from you to remove this field: when I activated this snippet, the dates turned into just numbers. Which you can see in the second picture from my last message from 2 days ago. The snippet you sent was:

add_filter(
	'hivepress/v1/forms/booking_update',
	function ( $form ) {
		unset($form['fields']);

		return $form;
	},
	1000
);

We also received a snippet to remove the “notes” field (which worked without it affecting the dates):

add_filter(
	'hivepress/v1/forms/booking_update',
	function ( $form ) {
		unset($form['fields']['note']);

		return $form;
	},
	1000
);

Yes, these fields are built-in depending on the settings you set for bookings. To remove the Quantity field, please disable the “Multiple places per booking” option in HivePress/Settings/Bookings section. Also, please delete this code snippet

add_filter(
    'hivepress/v1/forms/booking_update',
    function ( $form ) {
        unset($form['fields']);
        return $form;
    },
    1000
);

It seems to be a custom booking attribute (of Number type), please remove it in WordPress/Bookings/Attributes section.

Thank you it worked!

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