| 1 |
<?php |
| 2 |
/** |
| 3 |
* Slider section for the homepage. |
| 4 |
*/ |
| 5 |
add_action('innofit_slider_action','innofit_slider_section'); |
| 6 |
|
| 7 |
function innofit_slider_section() |
| 8 |
{ |
| 9 |
$home_slider_image = get_theme_mod('home_slider_image',SPICEB_PLUGIN_URL .'inc/innofit/images/slider/slider.jpg'); |
| 10 |
$home_slider_title = get_theme_mod('home_slider_title',__('We provide solutions to<br /> grow your business','spicebox')); |
| 11 |
$home_slider_discription = get_theme_mod('home_slider_discription',__('Welcome to Innofit','spicebox')); |
| 12 |
$home_slider_btn_txt = get_theme_mod('home_slider_btn_txt','Read More'); |
| 13 |
$home_slider_btn_link = get_theme_mod('home_slider_btn_link',esc_url('#')); |
| 14 |
$home_slider_btn_target = get_theme_mod('home_slider_btn_target',false); |
| 15 |
|
| 16 |
$home_page_slider_enabled = get_theme_mod('home_page_slider_enabled','on'); |
| 17 |
if($home_page_slider_enabled !='off') { |
| 18 |
?> |
| 19 |
<!-- Slider Section --> |
| 20 |
<section class="main-slider" id="totop"> |
| 21 |
<div class="item home-section home-full-height" style="background-image:url(<?php echo $home_slider_image; ?>);" > |
| 22 |
<div class="container slider-caption"> |
| 23 |
<div class="caption-content"> |
| 24 |
<?php if ( ! empty( $home_slider_discription ) || is_customize_preview() ) { ?> |
| 25 |
<h5 class="subtitle"><?php echo $home_slider_discription; ?></h5> |
| 26 |
<?php if ( ! empty( $home_slider_title ) || is_customize_preview() ) { ?> |
| 27 |
<h1 class="title"><?php echo $home_slider_title; ?></h1> |
| 28 |
<?php } ?> |
| 29 |
<?php } if($home_slider_btn_txt) { ?> |
| 30 |
<div class="ptop-15"> |
| 31 |
<a <?php if($home_slider_btn_link) { ?> href="<?php echo $home_slider_btn_link; } ?>" |
| 32 |
<?php if($home_slider_btn_target) { ?> target="_blank" <?php } ?> class="btn-small btn-animate light"> |
| 33 |
<?php if($home_slider_btn_txt) { echo $home_slider_btn_txt; } ?></a> |
| 34 |
</div> |
| 35 |
<?php } ?> |
| 36 |
</div> |
| 37 |
</div> |
| 38 |
<?php $slider_image_overlay = get_theme_mod('slider_image_overlay',true); |
| 39 |
$slider_overlay_section_color = get_theme_mod('slider_overlay_section_color','rgba(0,0,0,0.30)'); |
| 40 |
if($slider_image_overlay != false) { ?> |
| 41 |
<div class="overlay" style="background-color:<?php echo $slider_overlay_section_color;?>"></div> |
| 42 |
<?php } ?> |
| 43 |
</div> |
| 44 |
|
| 45 |
<!-- Slider Pointer --> |
| 46 |
<a href="#services" class="pointer-scroll section-scroll"> |
| 47 |
<i class="fa fa-angle-double-down scroll"></i> |
| 48 |
</a> |
| 49 |
<!-- /Slider Pointer --> |
| 50 |
<?php |
| 51 |
} ?> |
| 52 |
|
| 53 |
</section> |
| 54 |
<!-- /Slider Section --> |
| 55 |
<?php |
| 56 |
} |
| 57 |
?> |