Php BuddyPress秀后作者头像
在我所有博客帖子所在的主页上,我想显示作者的头像,然后将其链接到成员档案,例如:domain.com/members/cameron 我已经设法让阿凡达显示出来,只需要抓取网址:Php BuddyPress秀后作者头像,php,wordpress,buddypress,Php,Wordpress,Buddypress,在我所有博客帖子所在的主页上,我想显示作者的头像,然后将其链接到成员档案,例如:domain.com/members/cameron 我已经设法让阿凡达显示出来,只需要抓取网址:有人能帮忙吗?谢谢。你能试试这个吗 <a title="View profile for <?php echo get_the_author(); ?>" href="/members/<?php echo get_the_author_meta('nickname') ?>">
有人能帮忙吗?谢谢。你能试试这个吗
<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>
昵称与用户名不同。尝试用户登录确实有效,但它依赖于URL为/members/,这并不完美,但有效:/谢谢