How can i retrive the actor birthday by Date.
How i add the date, i have a custom field with Calendar.
Now is 20th ... how can i retrive the Actor By this day
I try this but it wont work
<?php // Get today's date in the right format $todaysDate = date('md'); ?> <?php $loop = new WP_Query( array( 'post_type' => 'persoane', 'posts_per_page' =>5, 'meta_key' => 'data_nasterii', 'meta_compare' => '=', 'meta_value' => $todaysDate, 'orderby' => 'meta_value', 'order' => 'ASC' ) ); ?> <?php while ($loop->have_posts()) : $loop->the_post(); ?>
The meta_key - data_nasterii is the custom field.
Ex: today is 20th Jan 2013
I want to retrivee all actors that are born in 20 th Jan , with the specification in (38 Years Old (2013-1975=38 years))
EX: 50 Cent - Today is his birthday. He is born on 20th Jan 1975 and he has 38 Years .
if anny body know's please post , it will be apreciate , when i found a solution myself i woud post here for others to see. Thanks.