As already said, your query arguments are slightly off – meta_query
should be an array of arrays:
$query = new WP_Query( array(
'category_name' => 'events',
'order' => 'DESC',
'orderby' => 'meta_value',
'meta_query' => array(
array(
'key' => 'start_date',
'value' => strtotime( 'today' ),
'compare' => '>=',
'type' => 'UNSIGNED', // Ensure MySQL treats the value as numeric
)
)
) );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
// Your template code
}
}