Adding videos to slider (3 posts)

  1. orbitfront
    Posted 2 years ago #

    Is it possible to have an embedded youtube video in the slider?

  2. Miss Incredibly Smart
    Posted 2 years ago #

    do you have a theme child? you can change the image to video link on element-slider.php

  3. sellis09
    Posted 2 years ago #

    Hi, I would like to do the same thing. I created a child theme and added the style.css and element-slider.php file but I'm not sure how to alter the code to allow it to accept videos in the slider. Here is the code:

    <div class="flex-container">
    	<div class="flexslider">
    	 	<ul class="slides">
    <?php for ($i = 1; $i <= 2; $i++) { ?>
    			  <a>"><img src="<?php if(esc_url(of_get_option('slider_image'.$i)) != NULL){ echo esc_url(of_get_option('slider_image'.$i));} else echo get_template_directory_uri() . '/images/slide'.$i.'.jpg' ?>" alt="<?php echo esc_html(of_get_option('slider_head'.$i)); ?>" /></a>
    			 <?php if(of_get_option('slider_caption') != "off") { ?>
    			<p class="flex-caption"><?php if(esc_html(of_get_option('slider_head'.$i)) != NULL){ echo esc_html(of_get_option('slider_head'.$i));} else echo "Nullam posuere felis a lacus tempor eget dignissim arcu adipiscing." ?><p>
    			 <?php } ?>
    			<?php } ?>
    </div> <!--slideshow end-->
      </div><!--flex container end-->
      <div class="clear"></div>

    Can you help me figure out what needs to be changed? Thanks a lot for your help!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic