1. Docs
  2. User Guide
  3. Enquiries
  4. Replace Make Enquiry Button With Custom Button

Replace Make Enquiry Button With Custom Button

remove_action( 'propertyhive_property_actions_list_start', 'propertyhive_make_enquiry_button', 10 );
add_filter( 'propertyhive_single_property_actions', 'add_custom_make_enquiry_action' );
function add_custom_make_enquiry_action( $actions )
{
    global $property;
  
    $action = array(
      'href' => 'https://www.your-site.co.uk/custom-url/?id=' .  $property->id . '&property=' . get_the_title($property->id),
      'label' => __( 'Make Enquiry', 'propertyhive' ),
      'class' => 'action-make-enquiry',
    );
	
    array_unshift($actions, $action);
  
    return $actions;
}