I use this in a page template, I am hoping for a solution to filling in the 'XXXXX' space with the current term selected of the taxonomy 'place'. I don't think i can do_shortcode within an array. I am not very good at php or wordpress. Thanks in advance.
$pages = get_posts(array(
'post_type' => 'directory_listing',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'place',
'field' => 'id',
//'terms' => 'the-damn-bar',
'terms' => 'XXXXX',
'include_children' => false
)
))
);
foreach ($pages as $mypost) {
echo '<div class="specialList">';
echo $mypost->post_content . '<br/>';
echo '</div>';
}
?>