<div <?php post_class('layout-post'); ?> > <?php if (has_post_thumbnail()) { ?> <div class='post-image'> <?php the_post_thumbnail(bsh_get_layout_size('est_large')); ?> </div> <?php } ?> <?php if (bsh_have_meta()) { ?> <div class='metas primary-links'> <span class='meta date'><img src='<?php echo get_template_directory_uri(); ?> /images/icons/glyphicons/black/14x14/clock.png'> <?php the_time('F j, Y'); ?> </span> <?php
function bsh_shortcode_slideshow($args) { global $shortcode_style, $post; $defaults = array('ids' => '', 'controlnav' => 'true', 'directionnav' => 'true', 'slideshowspeed' => '7000', 'animationspeed' => '600', 'animation' => 'slide'); $args = wp_parse_args($args, $defaults); extract($args); if (empty($ids)) { $images = get_posts('post_type=attachment&posts_per_page=-1&post_mime_type=image&parent=' . $post->ID); foreach ($images as $image) { $ids[] = $image->ID; } } else { $ids = explode(',', $ids); $ids = array_map('trim', $ids); } $random = substr(sha1(time() . rand(2234, 9999)), 0, 6); $output = '<div class="post-slider flexslider shortcode-slider" id="slider-' . $random . '"><ul class="slides">'; foreach ($ids as $id) { $image = wp_get_attachment_image($id, bsh_get_layout_size('est_large')); $output .= '<li>' . $image . '</li>'; } $output .= '</ul></div>'; $output .= ' <script type="text/javascript"> jQuery(window).load(function( ) { jQuery("#slider-' . $random . '").flexslider({ animation: "' . $animation . '", controlNav: ' . $controlnav . ', directionNav: ' . $directionnav . ', slideshowSpeed: ' . $slideshowspeed . ', animationSpeed: ' . $animationspeed . ', }); }); </script> '; return $output; }