下面的函数工作正常,但我需要在循环中运行它。如果这样做,文章内容实际上是从我的WP_Query的最后一篇文章中提取的。而不是从应该出现的那个。
有没有办法运行我的查询,让循环不受影响的?
function recent_post_by_author() {
echo '<div class="recent_post_by_author">';
$my_query = new WP_Query('author_name=Radek&showposts=2');
while ($my_query->have_po