0

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?enter image description here

That image is the tab I want to tell Wordpress to display the users' videos.

0

I'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.

  • Thank you! I'm trying to learn to code as I go along because doing helps better than watching or reading. The way I took it was to just add the shortcode. I didn't know you can build your own. I appreciate the help. – Richard Smith May 22 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.