Let Users Filter Posts by Custom Fields

Have you ever try to use ‘custom taxonomy’ to categorize the cars? I think taxonomy should be a more proper way to do this.

You could register car brands like:

// Register Custom Taxonomy
function wpse_131586_custom_taxonomy() {

    $labels = array(
        'name'                       => _x( 'Brands', 'Taxonomy General Name', 'wpse' ),
        'singular_name'              => _x( 'Brand', 'Taxonomy Singular Name', 'wpse' ),
        'menu_name'                  => __( 'Car Brands', 'wpse' ),
        'all_items'                  => __( 'All Items', 'wpse' ),
        'parent_item'                => __( 'Parent Item', 'wpse' ),
        'parent_item_colon'          => __( 'Parent Item:', 'wpse' ),
        'new_item_name'              => __( 'New Item Name', 'wpse' ),
        'add_new_item'               => __( 'Add New Item', 'wpse' ),
        'edit_item'                  => __( 'Edit Item', 'wpse' ),
        'update_item'                => __( 'Update Item', 'wpse' ),
        'separate_items_with_commas' => __( 'Separate items with commas', 'wpse' ),
        'search_items'               => __( 'Search Items', 'wpse' ),
        'add_or_remove_items'        => __( 'Add or remove items', 'wpse' ),
        'choose_from_most_used'      => __( 'Choose from the most used items', 'wpse' ),
        'not_found'                  => __( 'Not Found', 'wpse' ),
    );
    $args = array(
        'labels'                     => $labels,
        'hierarchical'               => true,
        'public'                     => true,
        'show_ui'                    => true,
        'show_admin_column'          => true,
        'show_in_nav_menus'          => true,
        'show_tagcloud'              => true,
    );
    //Change 'cars' to your post type accordingly
    register_taxonomy( 'car_brand', 'cars', $args );

}

// Hook into the 'init' action
add_action( 'init', 'wpse_131586_custom_taxonomy', 0 );

Hope you’ll get the idea of registering a custom taxonomy for car types.

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduedueduseduedusedusedueduedu