3
我需要得到一個作者的檔案,並排除所有其他人,Wordpress wp get archives()沒有那種過濾器。除了檔案館的一位作者,我怎樣才能讓所有其他人變得更好?如何通過作者用戶名獲得Wordpress檔案?
http://codex.wordpress.org/Template_Tags/wp_get_archives
<?php wp_get_archives('type=monthly'); ?>
我需要得到一個作者的檔案,並排除所有其他人,Wordpress wp get archives()沒有那種過濾器。除了檔案館的一位作者,我怎樣才能讓所有其他人變得更好?如何通過作者用戶名獲得Wordpress檔案?
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
對象。
看來這已經在這裏回答了:http://stackoverflow.com/questions/1333701/how-can-i-filter-blog-posts-by-author – Gipetto 2009-08-28 13:56:30