Skip to content

Instantly share code, notes, and snippets.

@bhubbard
Last active August 29, 2015 14:17
Show Gist options
  • Save bhubbard/508f433d9e89bc4c92fb to your computer and use it in GitHub Desktop.
Save bhubbard/508f433d9e89bc4c92fb to your computer and use it in GitHub Desktop.
<h3>Attornys who practice Burn Injuries</h3>
<?php
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'wplawyer-practice-area',
'field' => 'slug',
'terms' => array( 'burn-injury' )
),
),
'post_type' => 'wplawyer-attorney'
);
$loop = new WP_Query($args);
if($loop->have_posts()) { while($loop->have_posts()) : $loop->the_post();
//Output what you want
echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
endwhile;
}
wp_reset_query();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment