I\'ve a post with post_format = video
, in which the content are a video and a text (in the default editor). I need to display the video and the text separately. How can do it?
For now, I\'ve this code:
global $post;
$tmp_post = $post;
$args = array(
\'posts_per_page\' => 1,
\'post_type\' => \'post\',
\'post_status\' => \'publish\',
\'order\' => \'DESC\',
\'tax_query\' => array(
array(
\'taxonomy\' => \'post_format\',
\'field\' => \'slug\',
\'terms\' => array( \'post-format-video\' ) // post format
)
)
);
$video_posts = get_posts( $args );
foreach ($video_posts as $post ) :
setup_postdata( $post );
echo get_the_title($post->ID);
// ------> Here what code for get the video?
// html
// ...
// ...
// ------> Here what code for get the text (if possible)?
endforeach;
$post = $tmp_post;