1. Home
  2. Docs
  3. Property Hive – Cor...
  4. Enquiries
  5. 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;
}
Was this article helpful to you? No Yes

How can we help?