最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

I'm using rtMedia and Youzer. Can Shortcodes be used to display a video gallery?

programmeradmin1浏览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?

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 badge
Add a comment  | 

1 Answer 1

Reset to default 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.

发布评论

评论列表(0)

  1. 暂无评论