Buzzby
Newbie
Just Getting Started
Member Likes (0)
Hello,
I need to use bp_blog_permalink(); instead of bp_member_permalink() to link the user to his site.
Can you help me with the syntax ?
My installation is limited to 1 site by user.
<?php while ( bp_members() ) : bp_the_member(); ?>
<li>
<div class="item-avatar">
<a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar( 'type=full&width=183&height=183' ) ?></a>
</div>
<div class="item">
<div class="item-title">
<a href="<?php bp_member_permalink() ?>"><?php bp_member_name() ?></a>
<?php if ( bp_get_member_latest_update() ) : ?>
<span class="update"> - <?php bp_member_latest_update( 'length=10' ) ?></span>
<?php endif; ?>
</div>
<?php do_action( 'bp_directory_members_item' ) ?>
</div>
<div class="action">
<?php do_action( 'bp_directory_members_actions' ) ?>
</div>
<div class="clear"></div>
</li>
<?php endwhile; ?>
Thanks

Responses (4)
Inactive (joined February 2012) Likes (0)
Hey @Buzzby
Welcome to the Community!
Before I pass this onto a dev, have you tried simply by replacing bp_member_permalink() with bp_blog_permalink() ?
That might work, don't you think?
Member (joined May 2012) Likes (0)
For sure !
That return the primary site url not the user blog url.
I've tried with bp_blog_name() in the loop and nothing.
Inactive (joined February 2012) Likes (0)
Hey @Buzzby
I think what you need is this: http://codex.wordpress.org/Function_Reference/get_currentuserinfo
<a href="<?php global $current_user; get_currentuserinfo(); echo $current_user->user_url ?>"><?php bp_member_avatar( 'type=full&width=183&height=183' ) ?></a>Please give this a try, it should work I suppose.
People Person (joined February 2012) Likes (0)
Hi!
Just checking in :)
I'm guessing that because we haven't heard back from you that you've got your issue worked out via live chat or email, or that we have reached the end of our convo here. If you are still having problems or need any other answers on this particular topic please feel free to come back to this thread at anytime. Just be sure to mark it Not Resolved so we don't miss it!
This ticket is only being Resolved due to lack of activity. It is by no means an action to avoid, brush off or minimize your issue. We are ready and here if you want to re-open at any time and I apologize in advance for any lack of communication if this ticket is being closed in error.
Thanks for being part of the WPMU DEV Community!
Best,
Kimberly
Become a member