Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save propertyhive/6e2025af2687060553792661d0c0b2a5 to your computer and use it in GitHub Desktop.
Save propertyhive/6e2025af2687060553792661d0c0b2a5 to your computer and use it in GitHub Desktop.
Lobster Web Design Property Hive Search Form
add_filter( 'propertyhive_search_form_fields_shortcode', 'edit_property_search_form_shortcode_fields', 1, 1 );
function edit_property_search_form_shortcode_fields($form_fields)
{
// Change the labels from 'Sales' and 'Lettings' to 'Buy' and 'Rent'
$form_fields['department']['options']['residential-sales'] = 'Buy';
$form_fields['department']['options']['residential-lettings'] = 'Rent';
$form_fields['address_keyword'] = array(
'type' => 'text',
'show_label' => false,
'placeholder' => 'e.g. PLACEHOLDER HERE...',
'before' => '<div class="control control-address_keyword">',
);
return $form_fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment