function show_home_thumb($a, $c) { extract(shortcode_atts(array('img' => '', 'caption_title' => 'Something goes here', 'first_link_text' => 'More', 'first_link_href' => '#'), $a)); ?> <li class="span<?php echo intval(12 / intval(count_sidebar_widgets('modules', false))); ?> "> <div class="thumbnail"> <img data-src="holder.js/300x200" alt="300x200" style="width: 300px; height: 200px;" src="<?php echo ""; ?> "> <div class="caption"> <h3><?php echo $caption_title; ?> </h3> <p><?php echo do_shortcode($c); ?> </p> <p><a href="<?php echo $first_link_href; ?> " class="btn btn-primary"><?php echo $first_link_text; ?> </a> <a href="<?php echo $first_link_href; ?> " class="btn">Action</a></p> </div> </div> </li> <?php }
<?php get_header(); ?> <!-- Carousel ================================================== --> <div id="myCarousel" class="carousel slide"> <div class="carousel-inner"> <?php dynamic_sidebar('home-slider'); ?> </div> <?php if (count_sidebar_widgets('home-slider', false) > 1) { ?> <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a> <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a> <?php } ?> </div><!-- /.carousel --> <div class="container marketing"> <!-- Three columns of text below the carousel --> <div class="row spotlights" id="_spot"> <div class="span4"> <a href="#tab-1"><img class="img-circle" src="<?php echo get_template_directory_uri(); ?>
<?php if (is_active_sidebar('home-ffs')) { ?> <div id="slider" class="sl-slider-wrapper"> <div class="sl-slider"> <?php dynamic_sidebar('home-ffs'); ?> </div> <?php //vomit(count_sidebar_widgets('home-ffs')); if (count_sidebar_widgets('home-ffs' . false) > 1) { $str = '<nav id="nav-dots" class="nav-dots"><span class="nav-dot-current"></span>'; for ($i = 1; $i < count_sidebar_widgets('home-ffs' . false); $i++) { $str .= '<span></span>'; } $str .= '</nav>'; echo $str; } ?> </div> <?php } else { ?> <div class="container"> <h2>Static image</h2> </div> <?php }
//*********************** function count_sidebar_widgets($sidebar_id, $echo = true) { $the_sidebars = wp_get_sidebars_widgets(); if (!isset($the_sidebars[$sidebar_id])) { return __('Invalid sidebar ID'); } if ($echo) { echo count($the_sidebars[$sidebar_id]); } else { return count($the_sidebars[$sidebar_id]); } } //$widget_count = (int) (12 / count_sidebar_widgets( 'dock', false )); if (count_sidebar_widgets('dock', false) > 0) { $widget_count = (int) (12 / count_sidebar_widgets('dock', false)); } else { $widget_count = 12; } //*********************** // // CREATE DOCK WIDGET AREA // //*********************** $sidebars = array('Dock'); foreach ($sidebars as $dock) { register_sidebar(array('name' => $dock, 'id' => 'dock', 'before_widget' => '<div class="large-' . $widget_count . ' columns">', 'after_widget' => '</div>', 'before_title' => '<h6>', 'after_title' => '</h6>')); } //*********************** // // CUSTOM LOGIN LOGO
</div> <div class="clear"></div> */ ?> </div> <?php if (count($sb_count['Home_Page_Banner']) != '0') { ?> <div id="home_widgets"> <div id="home_widget_wrap" class="<?php $sb_count = wp_get_sidebars_widgets(); if (count($sb_count['Home_Page_Banner']) <= '3') { ?> banner_widget_count<?php count_sidebar_widgets('Home_Page_Banner'); } else { ?> banner_widget_overflow<?php } ?> "> <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Home_Page_Banner')) { } ?> <div class="clear"></div> </div> </div> <?php }
<?php if (of_get_option('footer_slogan') != '') { ?> <h1 id="footer_slogan"><?php echo stripslashes(of_get_option('footer_slogan')); ?> </h1> <?php } ?> <div id="footer_widgets" class="<?php $sb_count = wp_get_sidebars_widgets(); if (count($sb_count['Footer']) <= '5') { ?> footer_widget_count<?php count_sidebar_widgets('Footer'); } else { ?> footer_widget_overflow<?php } ?> "> <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer')) { } ?> <div class="clear"></div> </div> <div id="post_footer"> <?php