对于列表中的每个项目,我需要在
<?php
$da_place = get_field(\'smart_place\'); //acf field
$args = array(
\'post_type\' => \'to_do_items\',
\'tax_query\' => array(
relation => \'AND\',
array(
\'taxonomy\' => \'days\',
\'field\' => \'slug\',
\'terms\' => \'tuesday\',
),
array(
\'taxonomy\' => \'places\',
\'field\' => \'slug\',
\'terms\' => $da_place,
),
),
);
$the_query = new WP_Query( $args );
?> Tuesday <?
// The Loop
if ( $the_query->have_posts() ) {
echo \'<ul>\';
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo \'<li>\' . get_the_title() . \'\';
echo \'</li>\' ;
echo $specialTermHere;
}echo \'</ul>\';
/* Restore original Post Data */
wp_reset_postdata();
} else {
echo \'Nothing Today\';
// no posts found
}
//end of Tues
?>