Hi @yortem
I have taken the following code straight from the docs above and changed to the field name required:
<?php
// get posts
$posts = get_posts(array(
'post_type' => 'event',
'posts_per_page' => -1,
'meta_key' => 'field_name',
'orderby' => 'meta_value_num',
'order' => 'DESC'
));
if( $posts )
{
foreach( $posts as $post )
{
// ...
}
}
?>
Hope that helps.
Thanks
E