I have custom field artist_birth_date. Now I want to show artists list who have their birthday today. My date format is ‘January 6, 2019’ so I just need to compare month and day with today but I’m stuck getting this out from custom field to compare. Following is my loop code:
<?php
$today = date('F j');
$args = array(
'post_type'=> array( 'artist'),
'posts_per_page' => '-1',
'meta_key' => 'artist_birth_date',
'meta_query' => array(
array(
'key' => 'artist_birth_date',
'value' => $today,
'compare' => '=',
),
),
);
$the_query = new WP_Query( $args );
?>
Any help? I just need direction on how can I compare just day and month with today.