function acf_gallery() { //this is the gallery slideshow on trisled and single hpv page, grayjohnson inspired gallery //call the funtion with this //acf_gallery(); //this function is not an add component as its to specific and wp already has a gallery ?> <?php enqueue_jquery_cycle2_js_css(); ?> <section class = "gallery"> <article class="content"> <div class = "container"> <?php $gal = 'acf_gallery'; if (have_rows($gal)) { ?> <div id = "slideshow" class = "pics"> <?php while (have_rows($gal)) { the_row(); ?> <?php gisf('gallery_img', 'ml_gallery_hero', false); ?> <?php } ?> </div> <?php } else { // no rows found } if (have_rows($gal)) { ?> <ul class = "slideshow_nav" id = "nav"> <?php while (have_rows($gal)) { the_row(); ?> <li> <a href = "#"> <?php gisf('gallery_img', 'ml_thumb_size', false); ?> </a> </li> <?php } ?> </ul> <?php } else { // no rows found } ?> </div> </article> </section> <?php }
<?php function enqueue_jquery_cycle2_js_css() { wp_register_script('ios6_bug_fix', get_template_directory_uri() . '/acf/custom_fields/slideshow_jquery_cycle2/ios6-timers.js', '', '1.0.0', true); // Master js wp_enqueue_script('ios6_bug_fix'); wp_register_script('swipe', get_template_directory_uri() . '/acf/custom_fields/slideshow_jquery_cycle2/swipe.js', '', '1.0.0', true); // Master js wp_enqueue_script('swipe'); wp_register_script('jc_min', get_template_directory_uri() . '/acf/custom_fields/slideshow_jquery_cycle2/cycle2_min.js', '', '1.0.0', true); // Master js wp_enqueue_script('jc_min'); //wp_register_script('center', get_template_directory_uri() . '/acf/add_component/slideshow_jquery_cycle2/center.js', '', '1.0.0', true); // Master js //wp_enqueue_script('center'); //carosel pllugin needed for testimonial slider //wp_register_script('carousel_min', get_template_directory_uri() . '/jquery_cycle2/carousel_min.js', '', '1.0.0', true); // Master js //wp_enqueue_script('carousel_min'); } enqueue_jquery_cycle2_js_css();