Add descriptive text below attribute name in filter

Hi, Is there a way (maybe with a snippet) to adjust the Filter Form attribute headings? Right now I have an attribute name and I would like to add a line or two of descriptive text right below to explain what it means. This is to help the searcher (not vendor) understand the terms/parameters better.
I was able to just add text to the actual listing, single post, by adding in the details under the “display” section, but it doesn’t affect the filter form.
Thanks!

Hi,

Please use this PHP sample How to add custom code snippets - HivePress Help Center :

add_filter(
	'hivepress/v1/forms/listing_filter',
	function( $form ) {
		if(isset($form['fields']['bedrooms'])){
		  $form['fields']['bedrooms']['description'] = 'custom text here';
		}

		return $form;
	},
	1000
);

Please note that it can require further customization.

​I hope this is helpful to you.

1 Like