You are using 'author' => ...
twice in your code.
To get the author’s ID, you should use get_the_author_meta('ID')
instead. So, remove the second author argument, and use this in your code:
$author = get_the_author_meta('ID');
$args = array(
'posts_per_page' => $per_page,
'author'=> $author,
'post_type' => 'ultimate-auction',
//'auction-status' => 'expired',
'post_status' => 'publish',
'offset' => $pagination,
'orderby' => 'meta_value',
'meta_key' => 'wdm_listing_ends',
'order' => 'DESC',
);
By the way, the global $post
itself contains the ID of post’s author, which you can get it by using $post->post_author;
.
If you want to use the author’s name, you can use 'author_name' => ...
together with get_the_author_meta('nicename')
.
Take a look at author parameters of WP_Query
in the WordPress codex for more details.