I just put this code to get user id.
<a href="<?php echo bp_get_member_user_id() ?>" target="_blank"
> class="">View Profile</a>
Now it’s show the permalink as user id.
localhost/demo/members/5
But when I click view profile it’s show 404.
How to solve this problem?
2
Answers
the function
bp_get_member_user_id
only return an integer (the userid)in case your target is localhost/demo/members/5, try to use this code:
BuddyPress uses the user_name in a profile url. Unless you made changes to that functionality, an integer won’t work.
Try: