Slider Loop Array
-
Hi,
I know this is in the documentation, but can anyone talk me through in a bit ore detail how to create a slider loop array?What I’m struggling with is to understand what Sections and Settings to add and what ID etc do I need to give these?
I currently have this code:
</div> <div id="my-carousel"> <ul> <?php if ( function_exists( 'ot_get_option' ) ) { /* get the slider array */ $slides = ot_get_option( 'my_slider', array() ); if ( ! empty( $slides ) ) { foreach( $slides as $slide ) { echo ' <li> <img src="' . $slide['image'] . '" /></a> </li>'; } } } ?> </ul> </div>and I have a section called Slider with an ID of home_slider, in that section is a list-item Setting with the label Slider and ID of my_slider
Thanks in advance,
Sam
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Slider Loop Array’ is closed to new replies.