Guest User

Untitled

a guest
Jan 7th, 2020
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $consultstreet_main_slider_options = get_theme_mod('consultstreet_main_slider_content');
  3. $consultstreet_main_slider_disabled = get_theme_mod('consultstreet_main_slider_disabled', true);
  4. $consultstreet_slider_caption_layout = get_theme_mod('consultstreet_slider_caption_layout', 'consultstreet_slider_captoin_layout1');
  5. $consultstreet_main_slider_overlay_disable = get_theme_mod('consultstreet_main_slider_overlay_disable', true);
  6. $consultstreet_main_slider_overlay_color = get_theme_mod('consultstreet_main_slider_overlay_color', 'rgba(0, 0, 0, .35)');
  7. ?>
  8. <?php if( $consultstreet_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. $consultstreet_main_slider_options = json_decode($consultstreet_main_slider_options);
  16. if( $consultstreet_main_slider_options!='' )
  17. {
  18. foreach($consultstreet_main_slider_options as $slide_iteam){
  19. $title = ! empty( $slide_iteam->title ) ? apply_filters( 'consultstreet_translate_single_string', $slide_iteam->title, 'Theme Slider' ) : '';
  20. $img_description = ! empty( $slide_iteam->text ) ? apply_filters( 'consultstreet_translate_single_string', $slide_iteam->text, 'Theme Slider' ) : '';
  21. $readmorelink = ! empty( $slide_iteam->link ) ? apply_filters( 'consultstreet_translate_single_string', $slide_iteam->link, 'Theme Slider' ) : '';
  22. $readmore_button = ! empty( $slide_iteam->button_text ) ? apply_filters( 'consultstreet_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.  
  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 echo $slide_format_layout1; ?>">
  40. <?php if($title != ''){ ?>
  41. <h1 class="title-large"><?php echo wp_kses_post( html_entity_decode( $title ) ); ?></h1>
  42. <?php } ?>
  43. <?php if($img_description!= ''){ ?>
  44. <p class="description"><?php echo wp_kses_post( html_entity_decode( $img_description ) ); ?></p>
  45. <?php } ?>
  46. <?php if($readmore_button!='' ) { ?>
  47. <div class="mt-4 pt-2">
  48. <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>
  49. </div>
  50. <?php } ?>
  51. </div>
  52. </div>
  53. <?php } ?>
  54. <?php if( $consultstreet_main_slider_overlay_disable == true ): ?>
  55. <div class="overlay"></div>
  56. <?php endif; ?>
  57. </div>
  58. <?php
  59. }
  60. }
  61. else { ?>
  62. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/assets/img/slider/theme-slide1.jpg);">
  63. <div class="container theme-slider-content">
  64. <div class="theme-text-left">
  65. <h1 class="title-large"><?php esc_html_e('Provide Quality Consulting Service','consultstreet'); ?></h1>
  66. <p class="description"><?php esc_html_e('We provide world best consulting services for our clients to grow their businesses, so dont waste your time, contact us and see the results instantly.','consultstreet'); ?></p>
  67. <div class="mt-4 pt-2">
  68. <a href="#" class="btn-small btn-default"><?php esc_html_e('Check it out','consultstreet'); ?></a>
  69. </div>
  70. </div>
  71. </div>
  72. <?php if( $consultstreet_main_slider_overlay_disable == true ): ?>
  73. <div class="overlay"></div>
  74. <?php endif; ?>
  75. </div>
  76. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/assets/img/slider/theme-slide2.jpg);">
  77. <div class="container theme-slider-content">
  78. <div class="theme-text-left">
  79. <h1 class="title-large"><?php esc_html_e('Best Digital Marketing Solutions','consultstreet'); ?></h1>
  80. <p class="description"><?php esc_html_e('We provide world best consulting services for our clients to grow their businesses, so dont waste your time, contact us and see the results instantly.','consultstreet'); ?></p>
  81. <div class="mt-4 pt-2">
  82. <a href="#" class="btn-small btn-default"><?php esc_html_e('Check it out','consultstreet'); ?></a>
  83. </div>
  84. </div>
  85. </div>
  86. <?php if( $consultstreet_main_slider_overlay_disable == true ): ?>
  87. <div class="overlay"></div>
  88. <?php endif; ?>
  89. </div>
  90. <div class="item" style="background-image:url(<?php echo get_template_directory_uri(); ?>/assets/img/slider/theme-slide3.jpg);">
  91. <div class="container theme-slider-content">
  92. <div class="theme-text-left">
  93. <h1 class="title-large"><?php esc_html_e('We Are Very Happy to Present to You consultstreet','consultstreet'); ?></h1>
  94. <p class="description"><?php esc_html_e('We provide world best consulting services for our clients to grow their businesses, so dont waste your time, contact us and see the results instantly.','consultstreet'); ?></p>
  95. <div class="mt-4 pt-2">
  96. <a href="#" class="btn-small btn-default"><?php esc_html_e('Check it out','consultstreet'); ?></a>
  97. </div>
  98. </div>
  99. </div>
  100. <?php if( $consultstreet_main_slider_overlay_disable == true ): ?>
  101. <div class="overlay"></div>
  102. <?php endif; ?>
  103. </div>
  104. <?php } ?>
  105. </div>
  106. </section>
  107. <?php endif; ?>
RAW Paste Data Copied