When the question comes to what to use Post Type, Taxonomies, custom fields ?
I find that the understanding what each one of them stands for helps make the selection easier so i use:
- Post types – for all major data records that need/not to be displayed or queried.
- Taxonomies – for grouping posts/custom records together (with children) , helps a lot in queries.
- Custom fields – for extra data that needs to be specific per post/custom record ,maybe even to help in queries.
So in your case i would use:
- job title – post title
- description – content
- location – Custom Taxonomy (hirirchal)
- sector – Custom Taxonomy
- salary start – post meta
- salary end – post meta
- contact person – post meta
- skills – post meta maybe even a custom taxonomy (depends on your needs)
As for searching based on a mix of them its actually easier then it sounds :
$args = array(
'post_type' => 'job',
'posts_per_page' => -1,
'tax_query' => array( //this is for taxonomies
'relation' => 'AND',
array( //For location we use
'taxonomy' => 'location',
'field' => 'slug',
'terms' => array( 'florida', 'san-antonio' )
),
array(//for sector we use
'taxonomy' => 'sector',
'field' => 'slug',
'terms' => array( 'it' ),
'operator' => 'NOT IN'
)
),
'meta_query' => array( //this is for post meta
array(//lets say 10000 and above
'key' => 'salary_start',
'value' => array(10000),
'compare' => '>=',
'type' => 'NUMERIC'
)
)
);
$query = new WP_Query( $args );