Support » Plugin: BuddyPress Xprofile Custom Field Types » Display videos from oembed field that’s inside a repeater field

  • Resolved mfirefox

    (@mfirefox)


    Hi there. I created a repeater field with an oembed field inside to give the user the possibility to insert youtube and vimeo content. I figured out how to display the video but it’s always the last added, the others don’t show up. Can anyone help to show all videos inside that are in the repeater field?

    Here’s my code:
    function videos_content() {
    $current_author = get_the_author_meta(‘ID’);
    if ( $video_url = bp_profile_field_data(array(‘user_id’=>$current_author,’field’=>’Video’ )) );
    echo wp_oembed_get( $video_url );
    }

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Plugin Author BuddyDev

    (@buddydev)

    Hi,
    It seems you are using BuddyBoss platform.

    For repeater fields, they create multiple field with same name. So, using the field name will not be the right way to handle for repeater fields.

    You should try to find out the field id and use that instead. Field ids are unique.

    Regards
    Brajesh

Viewing 1 replies (of 1 total)
  • The topic ‘Display videos from oembed field that’s inside a repeater field’ is closed to new replies.