Allow selecting multiple categories

Hi,
I’m on hivepress. I can see from the back end, I can have a listing with several categories to check, but from the front end user area, I only have a drop down and can only select a single category. Is it possible to choose more than 1 category from the front end?

If the first part isn’t possible, I’m willing to disable listing categories completely, and move to attributes for these items. When I delete all categories from the back end, and make a new listing from the front end, the category dropdown disappears from the form (perfect!), but then when I hit save, it says that the category isn’t filled out. I’m guessing behind the scenes it’s filled in with a “-” which is empty value.
Can anyone recommend how to set a default category like “default” so the category isn’t blank? I can hide the field with CSS from there. Making it disappear completely with php would be best though!
Thanks!
Sarah

Hi,

Please note that 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 options enabled if selecting multiple items is required.

It is possible to try to use this PHP snippet, but please note that it can require further customization and additional testing.

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

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