[Resolved] Trying to use bp_profile_field_data() and oEmbed
I have a buddypress x_profile field named Video and I’d like to embed the URL (using the WP oEmbed functionality) into a post within the loop. I’m using bp_profile_field_data() and the user_id is the author of the post.
I’m successfully getting the video URL to show but it’s not embedded. Here’s what I have so far:
$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 );
I’m currently using the latest installs of WordPress (3.5.1) and Buddypress (1.7).
Any help/suggestions is greatly appreciated. I’ve been successful in using the same code when it comes to embedding custom fields but I’m not sure why this is only showing the URL.
- The topic ‘[Resolved] Trying to use bp_profile_field_data() and oEmbed’ is closed to new replies.