Guest User

Untitled

a guest
Jan 28th, 2020
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.58 KB | None | 0 0
  1. <?php spicepress_before_slider_section_trigger(); ?>
  2. <?php
  3. $slide_options = get_theme_mod('spicepress_slider_content');
  4.  
  5. if(empty($slide_options))
  6. {
  7.  
  8. if(get_theme_mod('home_slider_title') != '' || get_theme_mod('home_slider_discription') != '' || get_theme_mod('home_slider_image') != '')
  9. {
  10. $home_slider_title = get_theme_mod('home_slider_title');
  11. $home_slider_discription = get_theme_mod('home_slider_discription');
  12. $home_slider_btn_target = get_theme_mod('home_slider_btn_target');
  13. $home_slider_btn_txt = get_theme_mod('home_slider_btn_txt');
  14. $home_slider_btn_link = get_theme_mod('home_slider_btn_link');
  15. $home_slider_image = get_theme_mod('home_slider_image');
  16.  
  17.  
  18. $slide_options = json_encode( array(
  19. array(
  20. 'title' => !empty($home_slider_title)? $home_slider_title:'Standard Format',
  21. 'text' => !empty($home_slider_discription)? $home_slider_discription :'Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.',
  22. 'button_text' => !empty($home_slider_btn_txt)? $home_slider_btn_txt : 'Read more',
  23. 'link' => !empty($home_slider_btn_link)? $home_slider_btn_link : '#',
  24. 'slide_format' => 'customizer_repeater_slide_format_standard',
  25. 'image_url' => !empty($home_slider_image)? $home_slider_image : get_template_directory_uri().'/images/slide/slide01.jpg',
  26. 'open_new_tab' => !empty($home_slider_btn_target)? $home_slider_btn_target : false,
  27. 'id' => 'customizer_repeater_56d7ea7f40b50',
  28. ),
  29. ) );
  30.  
  31. }
  32.  
  33. }
  34.  
  35. $home_page_slider_enabled = get_theme_mod('home_page_slider_enabled','on');
  36. if($home_page_slider_enabled !='off')
  37. {
  38.  
  39. $animation = get_theme_mod('animation', '');
  40. $animation_speed = get_theme_mod('animation_speed', 3000);
  41. $isRTL = (is_rtl()) ? (bool) true : (bool) false;
  42.  
  43. $settings=array('animation'=>$animation,'animationSpeed'=>$animation_speed,'rtl'=>$isRTL );
  44.  
  45.  
  46. wp_register_script('spicepress-slider',get_template_directory_uri().'/js/front-page/slider.js',array('jquery'));
  47. wp_localize_script('spicepress-slider','slider_settings',$settings);
  48. wp_enqueue_script('spicepress-slider');
  49. ?>
  50. <!-- Slider Section -->
  51. <section id="slider-carousel" class="owl-carousel owl-theme">
  52. <?php
  53. $t=true;
  54. $slide_options = json_decode($slide_options);
  55. if( $slide_options!='' )
  56. {
  57. foreach($slide_options as $slide_iteam){ ?>
  58. <div id="post-<?php the_ID(); ?>" class="item"
  59. <?php if($slide_iteam->image_url!=''){
  60.  
  61. $slider_image = ! empty( $slide_iteam->image_url ) ? apply_filters( 'spicepress_translate_single_string', $slide_iteam->image_url, 'Slider section' ) : '';
  62. ?>
  63. style="background-image:url(<?php echo $slider_image; ?>); width: 100%; height: 90vh; background-position: center center; background-size: cover; z-index: 0; ">
  64. <?php $slider_image_overlay = get_theme_mod('slider_image_overlay',true);
  65. $slider_overlay_section_color = get_theme_mod('slider_overlay_section_color','rgba(0,0,0,0.30)');
  66. if($slider_image_overlay != false) { ?>
  67. <div class="overlay" style="background-color:<?php echo $slider_overlay_section_color;?>"></div>
  68. <?php } }
  69. $title = ! empty( $slide_iteam->title ) ? apply_filters( 'spicepress_translate_single_string', $slide_iteam->title, 'Slider section' ) : '';
  70. $img_description = ! empty( $slide_iteam->text ) ? apply_filters( 'spicepress_translate_single_string', $slide_iteam->text, 'Slider section' ) : '';
  71.  
  72. $readmorelink = ! empty( $slide_iteam->link ) ? apply_filters( 'spicepress_translate_single_string', $slide_iteam->link, 'Slider section' ) : '';
  73.  
  74. $readmore_button = ! empty( $slide_iteam->button_text ) ? apply_filters( 'spicepress_translate_single_string', $slide_iteam->button_text, 'Slider section' ) : '';
  75.  
  76. $slide_format = $slide_iteam->slide_format;
  77.  
  78. if($slide_format == 'customizer_repeater_slide_forma_video'):
  79.  
  80. $video_url = $slide_iteam->video_url;
  81.  
  82. endif;
  83.  
  84. $open_new_tab = $slide_iteam->open_new_tab;
  85.  
  86. ?>
  87.  
  88.  
  89. <?php if($slide_format == 'customizer_repeater_slide_format_standard'):?>
  90.  
  91. <div class="container">
  92.  
  93. <div class="format-standard">
  94. <?php if(($title!= '') || ($img_description)!='') { ?>
  95. <div class="slide-text-bg1">
  96. <h1><?php echo $title; ?></h1>
  97. <p><?php echo $img_description ;?></p>
  98. </div>
  99. <?php } if($readmore_button!='' ) { ?>
  100. <div class="slide-btn-area-sm">
  101. <a href="<?php echo $readmorelink ;?>" <?php if($open_new_tab== 'yes' || $open_new_tab== '1') { echo "target='_blank'"; } ?> class="slide-btn-sm">
  102. <?php echo $readmore_button ?>
  103. </a>
  104. </div>
  105. <?php } ?>
  106. </div>
  107.  
  108. </div>
  109.  
  110.  
  111. <?php endif; ?>
  112.  
  113. <?php if($slide_format == 'customizer_repeater_slide_format_status'):?>
  114.  
  115. <div class="format-status">
  116. <?php if($title!= '') { ?>
  117. <h1><?php echo $title; ?></h1>
  118.  
  119. <?php } if($img_description!= '') { ?>
  120. <p><?php echo $img_description ;?></p>
  121.  
  122. <?php } ?>
  123. <?php if($readmore_button!='' ) { ?>
  124. <a href="<?php echo $readmorelink ;?>" <?php if($open_new_tab== 'yes') { echo "target='_blank'"; } ?> class="format-status-btn-sm"><?php echo $readmore_button ?></a>
  125. <?php } ?>
  126.  
  127. </div>
  128.  
  129. <?php endif; ?>
  130.  
  131. <?php if($slide_format == 'customizer_repeater_slide_format_aside'):?>
  132.  
  133. <div class="format-aside">
  134.  
  135. <?php if($img_description!= '') { ?>
  136.  
  137. <p><?php echo $img_description ;?></p>
  138.  
  139. <?php } ?>
  140.  
  141. </div>
  142.  
  143. <?php endif; ?>
  144.  
  145. <?php if($slide_format == 'customizer_repeater_slide_format_quote'):?>
  146.  
  147. <div class="format-quote">
  148. <?php if($img_description!= '') { ?>
  149. <?php echo $img_description ;?>
  150. <?php } ?>
  151. <?php if($title!= '') { ?>
  152. <small><cite title="Source Title"><?php echo $title; ?></cite></small>
  153. <?php } ?>
  154. </div>
  155.  
  156. <?php endif; ?>
  157.  
  158. <?php if($slide_format == 'customizer_repeater_slide_forma_video'):?>
  159.  
  160. <div class="container format-video">
  161. <div class="row">
  162. <div class="col-md-6 col-sm-6 col-xs-6">
  163. <div class="audio-content">
  164. <?php echo do_shortcode( ' [player id=1944]' ); ?>
  165. </div>
  166. </div>
  167. <div class="col-md-6 col-sm-6 col-xs-6">
  168. <div class="video-content">
  169.  
  170. <?php if($title!= '') { ?>
  171. <h1><?php echo $title; ?></h1>
  172.  
  173. <?php } if($img_description!= '') { ?>
  174. <p><?php echo $img_description ;?></p>
  175. <?php } ?>
  176. <?php if($readmore_button!='' ) { ?>
  177. <a href="<?php echo $readmorelink ;?>" <?php if($open_new_tab== 'yes') { echo "target='_blank'"; } ?> class="format-video-btn-sm"><?php echo $readmore_button ?></a>
  178. <?php } ?>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183.  
  184. <?php endif; ?>
  185.  
  186.  
  187. </div>
  188. <?php }
  189. } else { ?>
  190. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/slide/slide01.jpg); width: 100%; height: 90vh; background-position: center center; background-size: cover; z-index: 0;">
  191. <div class="container">
  192. <div class="format-standard">
  193. <div class="slide-text-bg1">
  194. <h1><?php _e('Standard format','spicepress'); ?></h1>
  195. <p><?php _e('This is a very powerful theme that can be used for any type of business. The layout is clean and elegant.','spicepress'); ?></p>
  196. </div>
  197. <div class="slide-btn-area-sm">
  198. <a href="#" class="slide-btn-sm"><?php _e('Read More','spicepress'); ?></a>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/slide/slide02.jpg); width: 100%; height: 90vh; background-position: center center; background-size: cover; z-index: 0;">
  204. <div class="format-status">
  205. <h1><?php _e('Status format','spicepress'); ?></h1>
  206. <p><?php _e('This is a very powerful theme that can be used for any type of business. The layout is clean and elegant.','spicepress'); ?></p>
  207. <a href="#" class="format-status-btn-sm"><?php _e('Read More','spicepress'); ?></a>
  208. </div>
  209. </div>
  210. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/slide/slide03.jpg); width: 100%; height: 90vh; background-position: center center; background-size: cover; z-index: 0;">
  211. <div class="format-aside">
  212. <p><?php _e('This is a very powerful theme that can be used for any type of business. The layout is clean and elegant.','spicepress'); ?></p>
  213. </div>
  214. </div>
  215. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/slide/slide04.jpg); width: 100%; height: 90vh; background-position: center center; background-size: cover; z-index: 0;">
  216. <div class="format-quote">
  217. <?Php echo 'Sed ut Perspiciatis Unde Omnis Iste Sed ut perspiciatis unde omnis iste natu error sit voluptatem accu tium neque fermentum veposu miten a tempor nise. Duis autem vel eum iriure dolor in hendrerit in vulputate velit consequat reprehender in voluptate velit esse cillum duis dolor fugiat nulla pariatur.'; ?>
  218. <small><cite title="Source Title"><?php echo 'Martin Doe'; ?></cite></small>
  219. </div>
  220. </div>
  221. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/slide/slide05.jpg); width: 100%; height: 90vh; background-position: center center; background-size: cover; z-index: 0;">
  222. <div class="container format-video">
  223. <div class="row">
  224. <div class="col-md-6 col-sm-6 col-xs-6">
  225. <div class="video-frame">
  226. <iframe src="https://www.youtube.com/embed/sAWTZVpvPrQ"></iframe>
  227. </div>
  228. </div>
  229. <div class="col-md-6 col-sm-6 col-xs-6">
  230. <div class="video-content">
  231. <h1><?php _e('Video format','spicepress'); ?></h1>
  232. <p><?php _e('This is an example of a video post format displayed in the featured slider with an excerpt added.','spicepress'); ?></p>
  233. <a href="#" class="format-video-btn-sm"><?php _e('Read More','spicepress');?></a>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. <?php } ?>
  240. </section>
  241. <!-- /Slider Section -->
  242. <div class="clearfix"></div>
  243. <?php } ?>
  244. <?php spicepress_after_slider_section_trigger(); ?>
Add Comment
Please, Sign In to add comment