?> main-section clearfix"> <?php get_sidebar('browse'); ?> <div class="wrap-template-1 clearfix"> <section class="content-wrap" role="main"> <?php // Index content wrap inside top action do_action('ac_action_index_content_wrap_inside_top'); // Main slider if (get_theme_mod('ac_enable_slider', false) && is_front_page() && !is_paged() && ac_featured_posts_count() > 2) { get_template_part('featured-content'); } ?> <div class="posts-wrap clearfix"> <?php if (have_posts()) { while (have_posts()) { the_post(); get_template_part('post-templates/content'); } } else { get_template_part('post-templates/content', 'no-articles'); }
function ac_slider_options() { if (get_theme_mod('ac_enable_slider', false) && is_front_page() && !is_paged() && ac_featured_posts_count() > 2) { if (get_theme_mod('ac_autostart_slider', false)) { $slider_autostart = 'true'; } else { $slider_autostart = 'false'; } $slider_transition_delay = get_theme_mod('ac_slider_delay', '5000'); ?> <script type="text/javascript"> jQuery(function($){ $('.slider').jcarouselAutoscroll({ interval: <?php echo esc_html($slider_transition_delay); ?> , autostart: <?php echo $slider_autostart; ?> }); }); </script> <?php } return; }