[英]How To Get URL To Post Author's User BuddyPress Avatar Inside Wordpress Post Loop
[英]BuddyPress show post author avatar
我想在我所有博客文章所在的主页上显示作者的头像,然后将其链接到成员个人资料,例如:domain.com/members/cameron。
我设法显示了头像,只需要获取url: <a title="View profile for <?php echo get_the_author(); ?>" href=""><?php echo get_avatar( get_the_author_meta('user_email'), $size = '32' ); ?></a>
<a title="View profile for <?php echo get_the_author(); ?>" href=""><?php echo get_avatar( get_the_author_meta('user_email'), $size = '32' ); ?></a>
有人可以帮忙吗? 谢谢。
你可以试试这个吗?
<a title="View profile for <?php echo get_the_author(); ?>"
href="/members/<?php echo get_the_author_meta('nickname') ?>">
<?php echo get_avatar( get_the_author_meta('user_email'), $size = '32' ); ?>
</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.