有多少帖子作者想要显示作者框

时间:2012-11-08 04:29:54

标签: html wordpress wordpress-theming

我想在我的网站上发布的帖子中有多少帖子在下面的所有帖子作者框中显示。我怎么能点到它。我的作者框css代码如下所示。 my site

/***** Author Box *****/
.post-gravatar { position: relative; width: 60px; height: 60px; margin: 0 10px 0 0; float: left; }
.post-gravatar img { display: block; width: 50px; height: 50px; border: 1px solid #d9d9d9; background: #fcfcfc; padding: 4px; }
#author-box, #archived-author-box { position: relative; width: 598px; margin: 0 15px 25px; background: #f1f1f1; border: 1px solid #d9d9d9; padding: 10px; }
#author-box h3 { color: #222; font-size: 1.1em; margin: 0 0 10px; text-transform: uppercase; }
#author-text, #archived-author-text { position: relative; width: 528px; float: right; }
#author-text p { font-size: 1.2em; line-height: 1.6em; margin: 0 0 10px; }
#archived-author-text p { font-size: 1.2em; line-height: 1.6em; }
#author-text p a, #author-text p a:visited,
#archived-author-text p a, #archived-author-text p a:visited { text-decoration: none; }
#author-text p a:hover, #author-text p a:active,
#archived-author-text p a:hover, #archived-author-text p a:active { text-decoration: underline; }

1 个答案:

答案 0 :(得分:0)

您想显示每位作者撰写的帖子数量吗?

有一个名为the_author_posts() (Codex)

的功能

例如,在循环中你可以像这样使用它:

<p><?php the_author(); ?> has blogged <?php the_author_posts(); ?> posts.</p>

可以翻译类似

<p>Firstname Lastname has blogged 213 posts</p>"