function eightstore_lite_homepage_slider_content() { $display_slider = get_theme_mod('display_slider', '1') ? get_theme_mod('display_slider', '1') : "1"; $display_captions = get_theme_mod('display_captions', '1') ? get_theme_mod('display_captions', '1') : "1"; if ($display_slider == "1") { ?> <section id="home-slider"> <div class="es-slider"> <?php $slider_category = get_theme_mod('slider_setting_category'); if (!empty($slider_category)) { $loop = new WP_Query(array('cat' => $slider_category, 'posts_per_page' => -1)); if ($loop->have_posts()) { while ($loop->have_posts()) { $loop->the_post(); $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full', false); ?> <div class="slides"> <img src="<?php echo esc_url($image[0]); ?> " alt="<?php the_title_attribute(); ?> " /> <?php $display_captions = get_theme_mod('display_captions', '1'); if ($display_captions != 0) { $display_captions = 1; } if ($display_captions == 1) { ?> <div class="banner-caption"> <div class="caption-wrapper"> <div class="caption-title"><?php eightstore_lite_get_title(get_the_title()); ?> </div> <div class="caption-desc"><?php echo eightstore_lite_excerpt(get_the_content(), 100, '...', true, true); ?> </div> </div> </div> <?php } ?> </div> <?php } } ?> <?php } ?> </div> <?php } ?> </section> <?php }
if ($testimonial_query->have_posts()) { $j = 0; while ($testimonial_query->have_posts()) { $testimonial_query->the_post(); $testimonial_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'eightstore-testimonial-image', true); ?> <div class="testimonial-in-wrap <?php if ($j % 2 == 0) { echo "even"; } else { echo "odd"; } ?> "> <div class="testimonial-content"><?php echo eightstore_lite_excerpt(get_the_content(), 120); ?> <span><a href="<?php the_permalink(); ?> "><?php echo __('Read More', 'eightstore-lite'); ?> </a></span> </div> <div class="testimonial-title-img"> <a href="<?php the_permalink(); ?> "> <div class="testimonial-image">