Skip to content

Instantly share code, notes, and snippets.

@JoeHana
Last active February 1, 2017 20:30
Show Gist options
  • Save JoeHana/7163a65731171295cc6317270e521eb9 to your computer and use it in GitHub Desktop.
Save JoeHana/7163a65731171295cc6317270e521eb9 to your computer and use it in GitHub Desktop.
Add up to 20 bedrooms/bathrooms to listing details
<?php
/**
* Add up to 20 bedrooms/bathrooms to listing details
*/
add_filter( 'wpsight_details', 'custom_details' );
function custom_details( $details ) {
$data = array(
'' => __( 'n/d', 'wpcasa' ),
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
'7' => '7',
'8' => '8',
'9' => '9',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
);
$details['details_1']['data'] = $data;
$details['details_2']['data'] = $data;
return $details;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment