[英]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.