Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions includes/views/single-listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,14 @@ function single_listing_post_content() {
</div><!-- #listing-gallery -->
<?php } ?>

<?php if (get_post_meta( $post->ID, '_listing_video', true) != '') { ?>
<?php if (get_post_meta( $post->ID, '_listing_video', true) != '') {
$video_url = esc_url( get_post_meta( $post->ID, '_listing_video', true), array('http', 'https') );
?>
<div id="listing-video">
<div class="iframe-wrap">
<?php echo get_post_meta( $post->ID, '_listing_video', true); ?>
<?php if (wp_oembed_get( $video_url )){
echo wp_oembed_get( $video_url );
} else { echo "<a href='$video_url'>$video_url</a>"; } ?>
</div>
</div><!-- #listing-video -->
<?php } ?>
Expand Down