Hello,
I am using the code below in my member-header.php file
<div id="change-avatar-link"> <a href="<?php echo bp_loggedin_user_domain() ?>profile/change-avatar/">Change Your Avatar!</a> </div>
The problem now is that the link is also appearing on other members profile where by the link still redirects back to my own profile. How can I prevent the link from showing on others members profile. Only the currently logged in user should see the link in his profile and not other members profile header.
Thanks
Hi Tosin,
You can put it inside a condition like this<?php if ( bp_is_my_profile() ) : ?> <div id="change-avatar-link"> <a href="<?php echo bp_loggedin_user_domain() ?>profile/change-avatar/">Change Your Avatar!</a> </div> <?php endif; ?>
Regards
Brajesh
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
This topic is: not resolved