Ready to get started?Download WordPress


Featured Video Plus
Custom pop up link (1 post)

  1. gatorojo
    Posted 1 year ago #

    Hi guys, i´ve tried to put the image as background on a div, but i've made a button to play the video. but as i don't call with the_post_thumbnail(); i can't get the video to play, can you give me a hand please?

    <div class="lastnews">
    <?php $args = array( 'post_type' => 'videos', 'posts_per_page' => 1 );
    $loop = new WP_Query( $args ); ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
       <?php $feat_image = get_the_post_video_image_url( $post_id ); ?>
       <a href="#" class="play fvp_overlay" onclick="return false;"></a>
       <div class="videothumb" style="background-image:url('<?php echo $feat_image; ?>'); background-size: cover;"></div>
       <div class="post">
          <div class="fecha"><?php the_time('l, j \D\E F, Y') ?></div>
          <div class="titlepost">
            <a href="<?php the_permalink();?>" class="post-title"><?php the_title();?></a>
    <?php endwhile; ?>

    This just opens the black overlay, but won't play the video. Thanks since now.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.