this is my code
array(
'key' => 'janer',
'value' => 'drama',
'compare' => '==',
),
),
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'age',
'terms' => $slg1,
'field' => 'slug'
),
array(
'taxonomy' => 'publisher',
'terms' => $wslg1,
'field' => 'slug'
),
)
);
$query = new WP_Query( $args );
?>
<?php while ( $query->have_posts()) : $query->the_post();
$datetime = strtotime($post->post_date);
if( $datetime < ( time() - (60 * 60 * 24 * 200 ) ) ) { ?>
-
<?php
the_title(); ?>
<?php }
endwhile;
wp_mail( '[email protected]', 'Query Result', print_r( $query->posts, true ));
?>
i want email only title of post founded in thsi query then email result to my email
thank you!