RentalHive - Allow multiple categories to be selected in the List a Property Form

We are working with the theme and there is no option to add multiple categories per listing from this form. Can you direct me to a function call that allows multiple categories to be added to a listing?

Sorry, there’s no such option because categories are used as distinct criteria, many features rely on this (e.g. category-specific attributes and search filters). Please consider using a custom Select attribute with the Multiple option enabled if selecting multiple items is required.

1 Like

Hi Yevhen. We have had tickets going with Support all week to explain our use case. They pointed me here for the proper direction to ammend this so we can test it. We understand the risks of changing the form structure.

Please try this PHP snippet but please note that it can require further customization

add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
		if(isset($form['fields']['categories'])){
			$form['fields']['categories']['multiple'] = true;	
		}
		return $form;
	},
	1000
);
1 Like

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