Change tag filter format to checkboxes

Hi there!

Currently the tag filter is set to that dropbox list format and I am not able to change it inside the settings, am I. Is there a way to change that to checkboxes for example?

I attached a screenshot so you know what I mean.

Thank you!

Please try this PHP snippet

add_filter( 
	'hivepress/v1/models/listing/attributes',
	function ($attributes){
		if(isset($attributes['tags'])){
			$attributes['tags']['search_field']['type'] = 'checkboxes';
		}
		
		return $attributes;
	},
	1000
);

Awesome, thank you!

Is it possible to do just that for the Categories and Tags within the submit form as well?

Thank you a lot for your efforts, I really appreciate it.

Unfortunately, it is not possible for the Categories field as it causes some functionality problems. But it is possible for the Tags field. Please try this PHP snippet but please note that users will not have possibility to add custom tags when they add a listing with this snippet

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

Thank you for this one!

However, is it possible to make the category a radio option instead of that dropdown?

Thanks again

Unfortunately, there is no such possibility, it requires advanced customization

Just a short question regarding the category field. Is there a way to remove the dropbox option and have the category field open as soon as the page is loaded?

So technically it’s still a dropdown menu, but instead of opening the dropdown via a button the dropdown would be already open and the whole button is removed, so the dropdown cannot be opened and not closed either. Is this possible as a workaround?

Thank you

Sorry, there’s no such option, but you can enable the category selection on a separate page using this code snippet, this will add an extra step before the Add Details form Enable the Select Category page (deprecated) in the Add Listing process #hivepress #listings · GitHub

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