<div id="menu_fix">
<div class="header_menu">
<div class="mobile_nav"><a href="#"><?php _e('Menu...','skt-bizness'); ?></a></div>
<nav id="nav">
<?php wp_nav_menu( array('theme_location' => 'primary' ) ); ?>
</nav>
</div> <!--end.header_menu-->
</div>
</header>
<section id="home_slider">
<?php $default_images = array(
1 => get_template_directory_uri()."/images/slides/slide_01.jpg",
2 => get_template_directory_uri()."/images/slides/slide_02.jpg",
3 => get_template_directory_uri()."/images/slides/slide_03.jpg",
4 => get_template_directory_uri()."/images/slides/slide_01.jpg",
5 => get_template_directory_uri()."/images/slides/slide_03.jpg",
);
?>
<?php
$slAr = array();
$m = 0;
for ($i=1; $i<4; $i++) {
if ( get_theme_mod('slide_image'.$i,$default_images[$i]) ) {
$imgSrc = get_theme_mod('slide'.$i, $default_images[$i]);
$imgTitle = get_theme_mod('slide_title'.$i);
$imgDesc = get_theme_mod('slide_desc'.$i);
$imgLink = get_theme_mod('slide_link'.$i);
if ( strlen($imgSrc) > 3 ) {
$slAr[$m]['image_src'] = get_theme_mod('slide_image'.$i, $default_images[$i]);
$slAr[$m]['image_title'] = get_theme_mod('slide_title'.$i);
$slAr[$m]['image_desc'] = get_theme_mod('slide_desc'.$i);
$slAr[$m]['image_link'] = get_theme_mod('slide_link'.$i);
$m++;
}
}
}
$slideno = array();
if( $slAr > 0 ){
$n = 0;?>
<div class="slider-wrapper theme-default"><div class="slidefix"><div id="slider" class="nivoSlider">
<?php
foreach( $slAr as $sv ){
$n++; ?><img src="<?php echo esc_url($sv['image_src']); ?>" alt="<?php echo esc_attr($sv['image_title']);?>" title="<?php echo esc_attr('#slidecaption'.$n) ; ?>" /><?php
$slideno[] = $n;
}
?>
</div>
<?php
foreach( $slideno as $sln ){ ?>
<div id="slidecaption<?php echo $sln; ?>" class="nivo-html-caption">
<div class="slide_info">
<h1><?php echo get_theme_mod('slide_title'.$sln, 'Slide Title '.$sln); ?></h1>
<p><?php echo get_theme_mod('slide_desc'.$sln, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas pulvinar nibh purus, eget convallis erat efficitur eget.'); ?></p>
</div>
<div class="header_menu">
<div class="mobile_nav"><a href="#"><?php _e('Menu...','skt-bizness'); ?></a></div>
<nav id="nav">
<?php wp_nav_menu( array('theme_location' => 'primary' ) ); ?>
</nav>
</div> <!--end.header_menu-->
</div>
</header>
<section id="home_slider">
<?php $default_images = array(
1 => get_template_directory_uri()."/images/slides/slide_01.jpg",
2 => get_template_directory_uri()."/images/slides/slide_02.jpg",
3 => get_template_directory_uri()."/images/slides/slide_03.jpg",
4 => get_template_directory_uri()."/images/slides/slide_01.jpg",
5 => get_template_directory_uri()."/images/slides/slide_03.jpg",
);
?>
<?php
$slAr = array();
$m = 0;
for ($i=1; $i<4; $i++) {
if ( get_theme_mod('slide_image'.$i,$default_images[$i]) ) {
$imgSrc = get_theme_mod('slide'.$i, $default_images[$i]);
$imgTitle = get_theme_mod('slide_title'.$i);
$imgDesc = get_theme_mod('slide_desc'.$i);
$imgLink = get_theme_mod('slide_link'.$i);
if ( strlen($imgSrc) > 3 ) {
$slAr[$m]['image_src'] = get_theme_mod('slide_image'.$i, $default_images[$i]);
$slAr[$m]['image_title'] = get_theme_mod('slide_title'.$i);
$slAr[$m]['image_desc'] = get_theme_mod('slide_desc'.$i);
$slAr[$m]['image_link'] = get_theme_mod('slide_link'.$i);
$m++;
}
}
}
$slideno = array();
if( $slAr > 0 ){
$n = 0;?>
<div class="slider-wrapper theme-default"><div class="slidefix"><div id="slider" class="nivoSlider">
<?php
foreach( $slAr as $sv ){
$n++; ?><img src="<?php echo esc_url($sv['image_src']); ?>" alt="<?php echo esc_attr($sv['image_title']);?>" title="<?php echo esc_attr('#slidecaption'.$n) ; ?>" /><?php
$slideno[] = $n;
}
?>
</div>
<?php
foreach( $slideno as $sln ){ ?>
<div id="slidecaption<?php echo $sln; ?>" class="nivo-html-caption">
<div class="slide_info">
<h1><?php echo get_theme_mod('slide_title'.$sln, 'Slide Title '.$sln); ?></h1>
<p><?php echo get_theme_mod('slide_desc'.$sln, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas pulvinar nibh purus, eget convallis erat efficitur eget.'); ?></p>
</div>