There are several ways to do this, one method is to use get_the_terms
.
The logic would be to run the loop and customize the output based on the terms for that taxonomy ( this will probably not work out of the box).
//do a custom query here if needed
if ( have_posts() ) : while ( have_posts() ) : the_post();
$terms = get_the_terms($post->ID, 'Expertise');
//this will return and array of terms for your Expertise taxonomy.
foreach ( $terms as $term ) {
if($term->name == 'marine') {
// do custom stuff here
}elseif($term->name == 'waterway') {
// do custom stuff here
}elseif ....
After you comment it seems like you want no custom content per term, aka the same content for all 6 terms , this can be done with just a query loop, again there are several ways to do this.
http://codex.wordpress.org/Class_Reference/WP_Query
$args = array(
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'Expertise',
'field' => 'slug',
'terms' => array( 'marine', 'waterway', 'you_other_terms_here' ),
),
)
)
$query = new WP_Query( $args );
Another way is to use my original suggestion and just do a match for all get_the_terms
in the array you want using in_array
, it could be something like ( continued from original code above), but there are several way to do this in php:
foreach ( $terms as $term ) {
if (in_array('marine', '$term')) && (in_array('waterway', '$term')) && etc..
//do stuff
}