我正在尝试在我的 wordpress 网站的主页上显示帖子作者头像,现在它使用以下代码为所有作者显示一个通用图标
<article>
<header>
<div class="date"><?php the_time('M') ?><br /><span class="day"><?php the_time('j') ?></span><br /><?php the_time('Y') ?></div>
<div class="category"><?php the_category(' // ') ?></div>
<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
</header>
<?php if(of_get_option("alltuts_posts_layout")==0) { ?>
<div class="postThumb"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a></div>
<div class="textPreview">
<?php the_excerpt(); ?>
</div>
<?php } else { ?>
<?php the_content(''); ?>
<?php } ?>
<footer>
<a href="<?php the_permalink() ?>" class="more-link"><?php _e('Continue Reading ', 'site5framework'); ?>»</a>
<div class="metaRight">
<img src="<?php bloginfo('template_directory'); ?>/images/ico_author.png" alt="<?php _e('Author', 'site5framework'); ?>"/> <?php _e('An article by ', 'site5framework'); ?> <?php the_author_link(); ?>
<img src="<?php bloginfo('template_directory'); ?>/images/ico_comments.png" alt="<?php _e('Comments', 'site5framework'); ?>"/> <?php comments_popup_link(__("No Comments", "site5framework"),__("1 Comment", "site5framework"),__("% Comments", "site5framework") );?>
</div>
</footer>
</article>
请在此处查看运行代码
提前致谢