I have following Wordpress Code, which results in a list of properties.
$args = array( 'posts_per_page' => 5, 'post_type'=> 'property');
$myposts = get_posts( $args );
foreach ( $myposts as $property_data ):
$meta = get_post_meta( $property_data->ID );
$vdo_url = wp_get_attachment_url( $meta[fave_video_image][0] );
$images = wp_get_attachment_url( $meta[fave_property_images][0]);
$city = wp_get_post_terms($property_data->ID, 'property_city');
$type = wp_get_post_terms($property_data->ID, 'property_type');
$status1 = wp_get_post_terms($property_data->ID, 'property_status');
?>
<tr>
<td class="date">
<h5><input type="checkbox" class="propcheckbox" id="property" name="filedata[]" value="<?php echo $property_data->ID; ?>"> <?php echo $property_data->post_title; ?></h5>
</td>
<td class="hidden-xs hidden-sm">
<?php echo get_the_post_thumbnail( $property_data->ID ); ?>
</td>
<td>
<h5><?php echo $city[0]->name; ?></h5>
</td>
<td class="text-center">
<h5><?php echo $type[0]->name; ?></h5>
</td>
<td class="text-center">
<h5><?php echo $status1[0]->name ?></h5>
</td>
<td>
<h5><?php echo $property_data->post_date; ?></h5>
</td>
</tr>
<?php endforeach;
I want now to show only the properties where the property_status is not "verkauft". The property_status is in the wp_terms table.
What do I need to add/change?