Viewing 2 replies - 1 through 2 (of 2 total)
  • do you have a theme child? you can change the image to video link on element-slider.php

    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">
    
    	<!--slideshow-->
    
    	<div class="flexslider">
    	 	<ul class="slides">
    
    <?php for ($i = 1; $i <= 2; $i++) { ?>
    
    <li>
    			  <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 } ?>
    			</li>
    			<?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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding videos to slider’ is closed to new replies.