Wordpress 显示指定作者的文章
2010-03-02 09:24
302 查看
<ul>
<?php
//The Query
query_posts('caller_get_posts=1&author=1&showposts=3&post_type=post&post_status=publish&orderby=title&order=ASC');
//or query_posts('caller_get_posts=1&author_name=JonT&showposts=3&post_type=post&post_status=publish&orderby=title&order=ASC');
//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php
endwhile; else:
echo "不存在任何记录";
endif;
//Reset Query
wp_reset_query();
?>
</ul>
<?php
//The Query
query_posts('caller_get_posts=1&author=1&showposts=3&post_type=post&post_status=publish&orderby=title&order=ASC');
//or query_posts('caller_get_posts=1&author_name=JonT&showposts=3&post_type=post&post_status=publish&orderby=title&order=ASC');
//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php
endwhile; else:
echo "不存在任何记录";
endif;
//Reset Query
wp_reset_query();
?>
</ul>
相关文章推荐
- 如何让WordPress首页不显示指定分类的文章
- 让wordpress首页不显示指定分类文章的方法
- 如何处理wordpress首页不显示指定分类文章
- 让wordpress首页不显示指定分类文章
- 如何处理wordpress首页不显示指定分类文章
- WordPress使用自定义字段设置缩略图和显示作者文章数量和评论数量代码
- 让wordpress首页不显示指定分类文章的方法
- dede文章页面如何显示作者的头像默认只能显示作者用户名
- WORDPRESS自定义文章列表显示
- wordpress 首页文章显示摘要
- 调用WordPress指定目录或分类文章的方法
- 浅谈【WordPress技巧】自定义显示文章具体发表时间
- WordPress修改文章列表显示摘要
- WordPress显示当前文章分类下的其他文章
- wordpress首页文章显示reade more
- wordpress文章ID不连续显示问题的完美解决
- wordpress对显示某分类目录的文章列表页时对单个文章显示字数限制和省略
- 在WordPress上显示文章数、评论数等统计信息
- [二次开发]dede文章页面如何显示作者的头像
- WordPress中修改固定链接导致无法显示文章内容的问题的解决办法