This topic created in 4169 days ago, the information mentioned may be changed or developed.
通过QUERY_POST并没有相应的参数用来获取相应的数据
后来想到用SQL的方式 但这样无法获取文章链接
网上搜了居然没搜到相关教程 还是因为自己搜索的方式不对
<?php $post = $wpdb->get_results("SELECT post_date,post_title FROM $wpdb->posts where post_author=".$_GET['usid']);
foreach ($post as $post) {
echo '<article class="excerpt excerpt-one" ><a href="'.the_permalink().'">'.$post->post_title.'<span class="text-muted time" style="float:right">'.$post->post_date.'</a></span></article>';
}
?>
其中usid为URL传过来的参数 用来识别用户特定ID
4 replies 2014-12-09 12:40:22 +08:00  | | 1 kmvan Dec 9, 2014 via Android 1 new wp_query() 自己看官 |
 | | 2 kungfuchicken Dec 9, 2014 1 $query = new WP_Query( 'author=1' ); $query = new WP_Query( 'author_name=rami' ); |