Last Updated: February 25, 2016
·
666
· Aleksandar Perisic

Wordpress - OptionTree List View

Usage of OptionTree List View for slider:

SLIDER width LIST-VIEW

Get image ' . $slide['uploadimageslider_homepage'] . '

Get alt (title) ' . $slide['title'] . '

and link ' . $slide['homepagesliderlink'] .

<?php
                   if (function_exists('ot_get_option')) {

                       /* get the slider array */
                       $slides = ot_get_option('homepage_slider', array());

                       if (!empty($slides)) {
                           foreach ($slides as $slide) {
           echo '<figure class="stretch" data-stretch="' . $slide['upload_image_slider_homepage'] . '"><a href="' . $slide['homepage_slider_link'] . '">
                               <img src="' . $slide['upload_image_slider_homepage'] . '"  class="stretch">
                               <figcaption>    <h1 class="secondary pabs top">' . $slide['title'] . '</h1><div class="desc primary pabs bottom">' . $slide['title'] . '</div></figcaption>
                               </a></figure>';

                           }
                       }
                   }
       ?>