Please be patient if This doesn't make sense.
I'm using Youzer which adds advanced social networking features to BuddyPress. I also added rtmedia to allow users to upload videos. How do I use the shortcodes to show a video album of whatever users page I click on?
Example - Bob visits the site to look up Bill, once he is on bills profile I would like the videos that Bill uploaded to appear under a new tab.
Could I create my own string to get the user id or do I have to manually add the album to each new member?
That image is the tab I want to tell Wordpress to display the users' videos.
Please be patient if This doesn't make sense.
I'm using Youzer which adds advanced social networking features to BuddyPress. I also added rtmedia to allow users to upload videos. How do I use the shortcodes to show a video album of whatever users page I click on?
Example - Bob visits the site to look up Bill, once he is on bills profile I would like the videos that Bill uploaded to appear under a new tab.
Could I create my own string to get the user id or do I have to manually add the album to each new member?
That image is the tab I want to tell Wordpress to display the users' videos.
Share Improve this question asked May 21, 2019 at 22:01 Richard SmithRichard Smith 31 bronze badge1 Answer
Reset to default 0I'm not too familiar with BuddyPress and a total stranger to rtmedia. But out of curiosity I had a brief look at their documentations. Perhaps you could add a custom shortcode to your functions.php
, which gets the current profile ID and uses it with the rtmedia gallery shortcode to display videos from the profile.
Something along these lines,
function my_profile_videos_shortocde( $atts ) {
$profile_id = bp_displayed_user_id(); // not sure if this is the right function
if ( ! $profile_id ) {
return;
}
return do_shortode( '[rtmedia_gallery media_type="video" media_author="' . $profile_id . '"]' ); // add parameters to the shortcode as needed
}
add_shortcode( 'profile_videos', 'my_profile_videos_shortocde' );
You should then be able to use [profile_videos]
on the Tab content field.