User Media Link Code / Shortcode on a page


i would like to create a media link on a page using a shortcode or maybe a link code that users can click and for them to access their own medias.

looking forward for your help.



Probably you are looking for something like:

function mediaShortcode(){
    return bp_loggedin_user_domain() . "/media";
add_shortcode( 'usersmedia', 'mediaShortcode' );

The Shortcode would be [usersmedia]. Replace “media” with your slug for the Profile section.

hope it helps cheers f

appreciate this fabiankay. how about creating this as an external link or embedding the link in an email.

Maybe the bp_core_get_user_domain() is what you are looking for.


This will return any User by ID. Unfortunately I have no Idea how to do this from an external Site or mail. The Problem is that you can’t access your DB. I think the Link must be created on your Site.