User Media Link Code / Shortcode on a page


#1

hi

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.

thanks

dennis


#2

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


#3

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


#4

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

bp_core_get_user_domain($user_id).

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.


#5