WordPress调用当前文章作者头像

制作wordpress博客主题时经常会到用,需要调用wordpress当前文章作者头像的时候,用下面的这段代码即可。

复制代码
<?php if (have_posts()) : the_post(); update_post_caches($posts); ?>
//wodepress.com
<?php echo get_avatar( get_the_author_email(), '80' );?>//80代表头像的大小
<?php endif; ?>

原文

http://www.dulizhan.js.cn/jianzhan/4394.html

相关推荐
豆豆5 天前
2026 主流 CMS 建站系统对比分析:企业、个人建站该如何选型?
wordpress·建站系统·cms建站·企业建站·建站选型·saas建站·2026建站指南
VIP_CQCRE7 天前
用 Ace Data Cloud 自动发布 WordPress 文章:把 AI 写作变成可积累的 SEO 内容资产
ai·api·seo·wordpress·acedatacloud
VIP_CQCRE13 天前
用 Ace Data Cloud 自动发布 WordPress 文章:把 SEO 内容站变成长期增长资产
ai·自动化·seo·wordpress·acedatacloud
2601_9657984718 天前
Renovate Theme Setup: Fast Contractor & Construction Site Architecture
theme·wordpress
2601_9657984719 天前
Salient Theme Setup Guide for Fast Creative WordPress Sites
数据库·web3·php·wordpress
2601_9657984722 天前
Boutique Business Consulting WordPress Architecture & SEO Setup
android·theme·wordpress
2601_9657984722 天前
Plastic Surgery Clinic Web Setup: Deploying Rejuvita WordPress
php·theme·wordpress
2601_9657984723 天前
Contractor Web Setup: Deploying Bathrooms & Kitchens Theme Fast
前端·web3·php·wordpress
e6zzseo1 个月前
wordpress独立站seo怎么做才有效
seo·wordpress·独立站·内容优化·外链建设
Web极客码1 个月前
如何让用户订阅WordPress评论?提升用户互动的有效策略
运维·服务器·wordpress