Join our new community forum for support & discussion

Join Now

Home Support Themes RentalHive Can the tags be changed to a check box?

Can the tags be changed to a check box?

  • Author
    Posts
  • flantascience

    Is there a way to display the Tags as check boxes instead of the text box? This would make for a much more useful filtering system.

    I’m referring to the search/filter tool on the left-side of the Property Listings page:
    https://rentalhive.hivepress.io/properties/

    yevhen developer

    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
    );
    flantascience

    Thanks!!

    Any tricks to add icons to the checkboxes? I’m trying to find a way to make it sorta like AirBnb where people have a list of amenities to checkoff.

    ihor developer

    Please try using a custom Select attribute for this purpose (with Multiple option enabled). Adding icons for each option is not possible at the moment, but it may be possible with PHP & CSS customizations.

    flantascience

    Can you elaborate on what this means?
    “Please try using a custom Select attribute for this purpose (with Multiple option enabled).”

    ihor developer

    Sorry, I guess I misunderstood the issue – if you mean adding a custom icon for each of the attribute options there’s no such option yet, but we plan to add more formatting options for selectable attributes instead of just a comma-separated list. You can add a common icon for the attribute itself (in the Display section).

Viewing 6 posts - 1 through 6 (of 6 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.