[英]Wordpress - How can i get the current Author data with another Function
[英]How can I get Wordpress archives by author username?
我需要获取一个作者的档案并排除所有其他人,Wordpress wp get archives()没有那种过滤器。 除了一位来自档案馆的作者外,我怎样才能适应所有其他人?
http://codex.wordpress.org/Template_Tags/wp_get_archives
<?php wp_get_archives('type=monthly'); ?>
就在我的头顶:
get_posts(array('author_name' => 'the_authors_name'))
您没有像wp_get_archives
那样预先格式化任何内容,只有帖子列表,但您可以按作者获得帖子。 如果您需要做更多花哨的事情或想要运行WP循环,您也可以执行自定义WP_Query
对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.