Guest User

index-slider

a guest
Dec 6th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.92 KB | None | 0 0
  1. <?php
  2. $arilewp_main_slider_options = get_theme_mod('arilewp_main_slider_content');
  3. $arilewp_main_slider_disabled = get_theme_mod('arilewp_main_slider_disabled', true);
  4. $arilewp_slider_caption_layout = get_theme_mod('arilewp_slider_caption_layout', 'arilewp_slider_captoin_layout1');
  5. $arilewp_main_slider_overlay_disable = get_theme_mod('arilewp_main_slider_overlay_disable', true);
  6. $arilewp_main_slider_overlay_color = get_theme_mod('arilewp_main_slider_overlay_color', 'rgba(0, 0, 0, .35)');
  7. ?>
  8. <?php if( $arilewp_main_slider_disabled == true ): ?>
  9. <!-- Slider Section -->
  10. <section class="theme-main-slider" id="theme-slider">
  11.  
  12. <div id="theme-main-slider" class="owl-carousel owl-theme" id="home">
  13. <?php
  14. $t=true;
  15. $arilewp_main_slider_options = json_decode($arilewp_main_slider_options);
  16. if( $arilewp_main_slider_options!='' )
  17. {
  18. foreach($arilewp_main_slider_options as $slide_iteam){
  19. $title = ! empty( $slide_iteam->title ) ? apply_filters( 'arilewp_translate_single_string', $slide_iteam->title, 'Theme Slider' ) : '';
  20. $img_description = ! empty( $slide_iteam->text ) ? apply_filters( 'arilewp_translate_single_string', $slide_iteam->text, 'Theme Slider' ) : '';
  21. $readmorelink = ! empty( $slide_iteam->link ) ? apply_filters( 'arilewp_translate_single_string', $slide_iteam->link, 'Theme Slider' ) : '';
  22. $readmore_button = ! empty( $slide_iteam->button_text ) ? apply_filters( 'arilewp_translate_single_string', $slide_iteam->button_text, 'Theme Slider' ) : '';
  23. if( !empty($slide_iteam->slide_format)){
  24. $slide_format = $slide_iteam->slide_format;
  25. } else{ $slide_format = 'left'; }
  26. $open_new_tab = $slide_iteam->open_new_tab;
  27. if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout1'){
  28. if($slide_format == 'left'){ $slide_format_layout1 = ''; }
  29. if($slide_format == 'right'){ $slide_format_layout1 = 'align-right'; }
  30. if($slide_format == 'center'){ $slide_format_layout1 = 'align-center'; }
  31. }
  32.  
  33. ?>
  34. <?php if($slide_iteam->image_url!=''){ ?>
  35. <div class="item" style="background-image:url(<?php echo $slide_iteam->image_url; ?>);">
  36. <?php } ?>
  37. <?php if($title != '' || $img_description!= '' || $readmore_button!=''){ ?>
  38. <div class="container theme-slider-content">
  39. <div class="theme-text-<?php echo $slide_format; ?> <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout1') { echo 'theme-caption-bg '.$slide_format_layout1.''; } ?>">
  40. <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout2') { echo '<hr class="divider-sm-'.$slide_format.'">'; } ?>
  41. <?php if($title != ''){ ?>
  42. <h1 class="title-large"><?php echo $title; ?></h1>
  43. <?php } ?>
  44. <?php if($img_description!= ''){ ?>
  45. <p class="description"><?php echo wp_kses_post( html_entity_decode( $img_description ) ); ?></p>
  46. <?php } ?>
  47. <?php if($readmore_button!='' ) { ?>
  48. <div class="mt-4 pt-2">
  49. <a href="<?php echo $readmorelink ;?>" <?php if($open_new_tab== 'yes' || $open_new_tab== '1') { echo "target='_blank'"; } ?> class="btn-small btn-default"><?php echo $readmore_button ?></a>
  50. </div>
  51. <?php } ?>
  52. </div>
  53. </div>
  54. <?php } ?>
  55. <?php if( $arilewp_main_slider_overlay_disable == true ): ?>
  56. <div class="overlay"></div>
  57. <?php endif; ?>
  58. </div>
  59. <?php
  60. }
  61. }
  62. else { ?>
  63. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/assets/img/slider/theme-slide1.jpg);">
  64. <div class="container theme-slider-content">
  65. <div class="theme-text-left <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout1') { echo 'theme-caption-bg'; } ?>">
  66. <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout2') { echo '<hr class="divider-sm-left">'; } ?>
  67. <h1 class="title-large"><?php esc_html_e('We Create Amazing WordPress Themes','arilewp'); ?></h1>
  68. <p class="description"><?php esc_html_e('We are very happy to present to you ArileWP, the powerful and flexible multi-purpose WordPress theme. Not only does ArileWP outstand with many new features but suitable for all creatives and businesses. Join 2500+ customers.','arilewp'); ?></p>
  69. <div class="mt-4 pt-2">
  70. <a href="#" class="btn-small btn-default"><?php esc_html_e('Check it out','arilewp'); ?></a>
  71. </div>
  72. </div>
  73. </div>
  74. <?php if( $arilewp_main_slider_overlay_disable == true ): ?>
  75. <div class="overlay"></div>
  76. <?php endif; ?>
  77. </div>
  78. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/assets/img/slider/theme-slide2.jpg);">
  79. <div class="container theme-slider-content">
  80. <div class="theme-text-left <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout1') { echo 'theme-caption-bg'; } ?>">
  81. <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout2') { echo '<hr class="divider-sm-left">'; } ?>
  82. <h1 class="title-large"><?php esc_html_e('Best Digital Marketing Solutions','arilewp'); ?></h1>
  83. <p class="description"><?php esc_html_e('We are very happy to present to you ArileWP, the powerful and flexible multi-purpose WordPress theme. Not only does ArileWP outstand with many new features but suitable for all creatives and businesses. Join 2500+ customers.','arilewp'); ?></p>
  84. <div class="mt-4 pt-2">
  85. <a href="#" class="btn-small btn-default"><?php esc_html_e('Check it out','arilewp'); ?></a>
  86. </div>
  87. </div>
  88. </div>
  89. <?php if( $arilewp_main_slider_overlay_disable == true ): ?>
  90. <div class="overlay"></div>
  91. <?php endif; ?>
  92. </div>
  93. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/assets/img/slider/theme-slide3.jpg);">
  94. <div class="container theme-slider-content">
  95. <div class="theme-text-left <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout1') { echo 'theme-caption-bg'; } ?>">
  96. <?php if($arilewp_slider_caption_layout == 'arilewp_slider_captoin_layout2') { echo '<hr class="divider-sm-left">'; } ?>
  97. <h1 class="title-large"><?php esc_html_e('We Are Very Happy to Present to You ArileWP','arilewp'); ?></h1>
  98. <p class="description"><?php esc_html_e('We are very happy to present to you ArileWP, the powerful and flexible multi-purpose WordPress theme. Not only does ArileWP outstand with many new features but suitable for all creatives and businesses. Join 2500+ customers.','arilewp'); ?></p>
  99. <div class="mt-4 pt-2">
  100. <a href="#" class="btn-small btn-default"><?php esc_html_e('Check it out','arilewp'); ?></a>
  101. </div>
  102. </div>
  103. </div>
  104. <?php if( $arilewp_main_slider_overlay_disable == true ): ?>
  105. <div class="overlay"></div>
  106. <?php endif; ?>
  107. </div>
  108. <?php } ?>
  109. </div>
  110. </section>
  111. <?php endif; ?>
Add Comment
Please, Sign In to add comment