I have a custom post type called people.
I want to have 3 search fields for; first-name, middle-name and last-name
I was thinking about creating a page with my own search boxes and use query_posts:
<?php query_posts( array( 'post_status' => 'publish' ,
'post_type' => array( 'people' ),
'meta_query' => array(
array (
'key' => 'last-name',
'value' => $last,
'compare' => 'LIKE'
),
array (
'key' => 'first-name',
'value' => $first,
'compare' => 'LIKE'
),
array (
'key' => 'middle-name',
'value' => $middle,
'compare' => 'LIKE'
)
)
)
); ?>
Is this the correct way to search?