Adding labels in the search field

In response to this closed thread:

I was able to use ihor’s custom CSS to display the label for my “guests” field, but it didn’t work for the two other fields (location and date).

Can you please help me show those labels?

Hi,

Please try these PHP snippets:

add_filter(
 'hivepress/v1/forms/listing_search',
 function($form){
  
  if(isset($form['fields']['_dates'])){
   $form['fields']['_dates']['label'] = 'Custom date text';
  }
  
  if(isset($form['fields']['location'])){
   $form['fields']['location']['label'] = 'Custom location text';
  }
  
  return $form;
 },
 1000
);

Please note that it can require further customization.
If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY