这是代码,基本上我想通过博文作者获取,但无法解决此问题,对此有任何帮助。
<?php
global $post;
$author = get_the_author();
$args = array(
\'author\' =>$user_ID,
\'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\',
);
$author_posts = new WP_Query( $args );
if( $author_posts->have_posts() ) {
while( $author_posts->have_posts()) {
$author_posts->the_post();
?>
<?php the_content();?></div>
<?php
// you should have access to any of the tags you normally
// can use in The Loop
}
wp_reset_postdata();
}
?>