Car Demon Code Docs

  1. Home
  2. Car Demon Code Docs
  3. Admin Filters
  4. cd_location_fields_filter


This filter allows you to modify the location fields available for each locations settings.

$fields = apply_filters( ‘cd_location_fields_filter’, $fields );

add_filter( 'cd_location_fields_filter', 'my_fields', 10, 1 );
function my_fields( $fields ) {
    $fields[] = array(
        'field' => '_my_city',
        'label' => 'My City',
        'type' => 'text',
        'default' => '',
        'msg' => 'Enter a City name here'

return $fields;

The above example adds a new location field called ‘My City’ to each location.

Was this article helpful to you? Yes No

How can we help?