wordpress meta value compare between two date
After some research on wp codex I found my solution. Here I have to change birth_date format during save. I saved value like yy-mm-dd this format and changed my meta_query Here is the code $studentdata = get_users( array( ‘meta_query’=> array( array( ‘key’ => ‘birth_date’, ‘value’ => array( $startyear.’-01-01′,$endyear.’-12-31′), ‘compare’ => ‘BETWEEN’, ) ), ‘role’=>’student’ ) … Read more