function ts_portfolio_item_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => 0), $atts));
    global $post;
    $html = '';
    $new_post = null;
    if (!empty($id)) {
        $new_post = get_post($id);
    }
    if ($new_post) {
        $post = $new_post;
        setup_postdata($post);
        $image = '';
        $slider = '';
        $portfolio_slider = ts_get_post_opt('portfolio_slider');
        if (is_array($portfolio_slider) && count($portfolio_slider) > 0) {
            foreach ($portfolio_slider as $slide) {
                if (!empty($slide['image'])) {
                    $image = theme_thumb($slide['image'], 370, 270, 'c');
                }
                $slider .= ' 
					<div class="col-sm-12 col-md-12">
					  <img src="' . esc_url($image) . '" alt="" title="">
					</div>';
            }
        }
        if (!empty($slider)) {
            $gallery = '
				<div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true">
					<div class="row">
						<div class="carousel">' . $slider . '</div>
					</div>
					<div class="clearfix"></div>
					<div class="pagination switches"></div>
				</div>';
        } else {
            $gallery = '<img src="' . esc_url(get_xv_thumbnail(370, 270)) . '" class="single-image" />';
        }
        $html = '
			<div class="work-single row ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>
				<div class="images-box col-sm-5 col-md-4">
					' . $gallery . '
				</div>

				<div class="work-description col-sm-7 col-md-8">
				  <h3 class="title">' . get_the_title() . '</h3>
				  <div class="type">' . xv_get_field('client') . '</div>

				  <div>
					' . apply_filters('the_content', get_the_content()) . '
					<div class="tags"><b>' . __('Categories', 'progressive') . ': </b>' . strip_tags(get_the_term_list($post->ID, 'portfolio_category', '', ', ')) . '</div>
				  </div>
				</div>
				<div class="clearfix"></div>
			  </div>';
        wp_reset_postdata();
    }
    return $html;
}
function ts_banner_carousel_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'carousel_style' => '', 'full_width_lines' => '', 'category' => '', 'limit' => 10), $atts));
    // Reset and setup variables
    $output = '';
    $temp_title = '';
    $temp_link = '';
    $carousel_classes = '';
    if ($carousel_style == 'mini') {
        $width = 127;
        $height = 79;
        $carousel_classes = 'banner-set-mini banner-set-no-pagination';
    } else {
        $width = 253;
        $height = 158;
    }
    if ($full_width_lines == 'enabled') {
        $carousel_classes .= ' banner-border-shop';
    }
    $output .= "<div class='banner-set load " . sanitize_html_classes($carousel_classes) . "'>\n            <div class='container'>\n              <div class='banners'>";
    $args = array('post_type' => 'banner', 'posts_per_page' => $limit);
    if (!empty($category)) {
        $args['tax_query'] = array(array('taxonomy' => 'banner-cat', 'field' => 'id', 'terms' => $category));
    }
    $current_animation_delay = $animation_delay;
    query_posts($args);
    // the loop
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $temp_title = get_the_title($post->ID);
            $url = xv_get_field('url');
            $temp_link = '#';
            if ($url) {
                $temp_link = $url;
            }
            $excerpt = get_xv_excerpt(250);
            // output all findings - CUSTOMIZE TO YOUR LIKING
            $output .= "<a  class='banner " . ts_get_animation_class($animation) . "' href='" . esc_url($temp_link) . "' " . ts_get_animation_data_class($current_animation_delay, $animation_iteration) . ">";
            $thumb = get_xv_thumbnail($width, $height);
            $output .= '<img src="' . esc_url($thumb) . '" alt="' . the_title_attribute('echo=0') . '" />';
            $output .= "<h2 class='title'>{$temp_title}</h2>";
            if ($carousel_style != 'mini') {
                $output .= "<div class='description'>{$excerpt}</div>";
            }
            $output .= "</a>";
            $current_animation_delay += $animation_delay_item;
        }
    }
    wp_reset_query();
    $output .= "</div>\n                  <div class='clearfix'></div>\n                 </div>\n                  <div class='nav-box " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($current_animation_delay, $animation_iteration) . ">\n                  <div class='container'>\n                    <a class='prev' href='#'><span class='icon-left'></span></a>\n                    <div class='pagination switches'></div>\n                    <a class='next' href='#'><span class='icon-right'></span></a>  \n                  </div>\n                  </div>\n                </div>\n                <div class='clearfix'></div>";
    return $output;
}
function recent_posts2_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'title' => '', 'style' => '', 'count' => '4', 'length' => '125', 'blog_text' => '', 'blog_url' => ''), $atts));
    ob_start();
    ?>
	<?php 
    if (!empty($title)) {
        $t_class = 'title-box';
    } else {
        $t_class = '';
    }
    $current_animation_delay = $animation_delay;
    ?>
	<div class="news <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
	    <div class="<?php 
    echo esc_attr($t_class);
    ?>
">
			<?php 
    if (!empty($blog_text)) {
        ?>
				<a href="<?php 
        echo esc_url($blog_url);
        ?>
 " class="btn btn-default"><?php 
        echo esc_html($blog_text);
        ?>
 <span class="glyphicon glyphicon-arrow-right"></span></a>
			<?php 
    }
    ?>
			<h2 class="title"><?php 
    echo esc_html($title);
    ?>
</h2>
	    </div>
	    <div class="row">

			<?php 
    $current_animation_delay += $animation_delay_item;
    query_posts(array('post_type' => 'post', 'posts_per_page' => $count));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(84, 84);
            $excerpt = get_xv_excerpt($length);
            ?>

					<div class="news-item col-sm-12 <?php 
            echo esc_attr($style);
            ?>
 <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
            ?>
>
						<div class="time"><?php 
            the_time('j.m.Y');
            ?>
</div>
						<h3 class="title"><a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
"><?php 
            the_title();
            ?>
</a></h3>
						<div class="news-body"><?php 
            echo wp_kses_post($excerpt);
            ?>
</div>
						<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" class="more"><?php 
            _e('Read more', 'progressive');
            ?>
 <span class="fa fa-angle-right"></span></a>
					</div><!-- .news-item -->

					<?php 
        }
    }
    wp_reset_query();
    ?>
  
	    </div>
	</div><!-- .news -->
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function woo_products_2_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'orderby' => '', 'limit' => '', 'show' => '', 'order' => ''), $atts));
    if (!class_exists('woocommerce')) {
        return '';
    }
    ob_start();
    global $post;
    $query_args = array('posts_per_page' => $limit, 'post_status' => 'publish', 'post_type' => 'product', 'no_found_rows' => 1, 'order' => $order == 'asc' ? 'asc' : 'desc');
    $query_args['meta_query'] = array();
    $query_args['meta_query'][] = WC()->query->stock_status_meta_query();
    $query_args['meta_query'] = array_filter($query_args['meta_query']);
    switch ($show) {
        case 'featured':
            $query_args['meta_query'][] = array('key' => '_featured', 'value' => 'yes');
            break;
        case 'onsale':
            $product_ids_on_sale = wc_get_product_ids_on_sale();
            $product_ids_on_sale[] = 0;
            $query_args['post__in'] = $product_ids_on_sale;
            break;
    }
    switch ($orderby) {
        case 'price':
            $query_args['meta_key'] = '_price';
            $query_args['orderby'] = 'meta_value_num';
            break;
        case 'rand':
            $query_args['orderby'] = 'rand';
            break;
        case 'sales':
            $query_args['meta_key'] = 'total_sales';
            $query_args['orderby'] = 'meta_value_num';
            break;
        default:
            $query_args['orderby'] = 'date';
    }
    $current_animation_delay = $animation_delay;
    ?>
	<div class="bottom-padding">
		<div class="row text-center">

			<?php 
    $j = 1;
    $k = 1;
    $loop = new WP_Query($query_args);
    if ($loop->have_posts()) {
        while ($loop->have_posts()) {
            $loop->the_post();
            $temp = 1;
            $product = new WC_Product(get_the_ID());
            ?>
					<div class="col-sm-3 col-md-3 product product-centered <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
            ?>
>
						<div class="default">
					<?php 
            if ($product->is_on_sale()) {
                ?>
						<?php 
                echo apply_filters('woocommerce_sale_flash', '<span class="sale-custome"></span>', $post, $product);
                ?>
					<?php 
            }
            ?>

							<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" class="product-image">
								<img src="<?php 
            echo esc_url(get_xv_thumbnail(270, 270));
            ?>
" />
							</a>
							<div class="actions not-rotation-actions">
								<?php 
            wc_get_template('/loop/add-to-cart.php');
            ?>
								<?php 
            if (class_exists('YITH_WCWL')) {
                echo do_shortcode('[yith_wcwl_add_to_wishlist]');
            }
            ?>

								<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" class="add-compare">
									<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
										<path fill="#1e1e1e" d="M16,3.063L13,0v2H1C0.447,2,0,2.447,0,3s0.447,1,1,1h12v2L16,3.063z"></path>
										<path fill="#1e1e1e" d="M16,13.063L13,10v2H1c-0.553,0-1,0.447-1,1s0.447,1,1,1h12v2L16,13.063z"></path>
										<path fill="#1e1e1e" d="M15,7H3V5L0,7.938L3,11V9h12c0.553,0,1-0.447,1-1S15.553,7,15,7z"></path>
									</svg>
								</a>
							</div>
							<div class="product-description">
								<div class="vertical">
									<h3 class="product-name">
										<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
"><?php 
            the_title();
            ?>
</a>
									</h3>
									<div class="price"><?php 
            echo $product->get_price_html();
            ?>
</div>	
								</div>
							</div>
						</div>
					</div><!-- .product -->
			<?php 
            $current_animation_delay += $animation_delay_item;
            $k++;
        }
    } else {
        echo __('No products found', 'progressive');
    }
    wp_reset_postdata();
    ?>
		</div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
							</div>

							<div class="clearfix"></div>

							<div class="row">
								<div class="carousel no-responsive gallery">

									<?php 
    $orig_post = $post;
    global $post;
    $args = array('orderby' => 'rand', 'post_type' => 'portfolio', 'posts_per_page' => 8, 'ignore_sticky_posts' => 1);
    query_posts($args);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(270, 135);
            ?>
  

											<div class="col-sm-3 col-md-3">
												<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
">
													<?php 
            echo '<img class="img-rounded" src="' . esc_url($thumb) . '" alt="' . esc_attr(get_the_title()) . '">';
            ?>
												</a>
											</div> 

function ts_team_post_carousel_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'limit' => 8, 'width' => 270, 'height' => 270), $atts));
    ob_start();
    if (empty($title)) {
        $title_class = '';
    } else {
        $title_class = 'title-box';
    }
    ?>

	<div class="carousel-box bottom-padding bottom-padding-mini load <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="<?php 
    echo sanitize_html_class($title_class);
    ?>
 no-margin">
			<a class="next" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
				</svg>
			</a>
			<a class="prev" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
				</svg>
			</a>
			<?php 
    if (!empty($title)) {
        echo '<h2 class="title">' . $title . '</h2>';
    }
    ?>
		</div>

		<div class="clearfix"></div>

		<div class="row">
			<div class="carousel">
				<?php 
    query_posts(array('post_type' => 'team', 'posts_per_page' => $limit));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail($width, $height);
            $designation = get_post_meta(get_the_ID(), 'xv_member_designation', TRUE);
            $about = get_post_meta(get_the_ID(), 'xv_member_about', TRUE);
            $email = get_post_meta(get_the_ID(), 'xv_member_email', TRUE);
            $phone = get_post_meta(get_the_ID(), 'xv_member_phone', TRUE);
            $facebook = get_post_meta(get_the_ID(), 'xv_member_facebook', TRUE);
            $twitter = get_post_meta(get_the_ID(), 'xv_member_twiiter', TRUE);
            $gplus = get_post_meta(get_the_ID(), 'xv_member_gplus', TRUE);
            $linkedin = get_post_meta(get_the_ID(), 'xv_member_linkedin', TRUE);
            ?>

						<div class="col-sm-3 col-md-3 employee rotation">
							<div class="default">
								<div class="image">
									<img src="<?php 
            echo esc_url($thumb);
            ?>
" alt="">
								</div>
								<div class="description">
									<div class="vertical">
										<h3 class="name"><?php 
            the_title();
            ?>
</h3>
										<div class="role"><?php 
            echo esc_html($designation);
            ?>
</div> 
									</div>
								</div>
							</div>
							<div class="employee-hover">
								<h3 class="name"><?php 
            the_title();
            ?>
</h3>
								<div class="role"><?php 
            echo esc_html($designation);
            ?>
</div>
								<div class="image">
									<img src="<?php 
            echo esc_url($thumb);
            ?>
" alt="">
								</div>
								<div>
									<p><?php 
            echo wp_kses_post($about);
            ?>
</p>
									<div class="contact"><b><?php 
            _e('Email', 'progressive');
            ?>
: </b><?php 
            echo esc_html($email);
            ?>
</div>
									<div class="contact"><b><?php 
            _e('Phone', 'progressive');
            ?>
: </b><?php 
            echo esc_html($phone);
            ?>
</div>
								</div>

								<div class="social">
									<?php 
            if (!empty($facebook)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-facebook' href='" . esc_url($facebook) . "'></a></div>";
            }
            if (!empty($twitter)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-twitter' href='" . esc_url($twitter) . "'></a></div>";
            }
            if (!empty($gplus)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-gplus' href='" . esc_url($gplus) . "'></a></div>";
            }
            if (!empty($linkedin)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-linkedin' href='" . esc_url($linkedin) . "'></a></div>";
            }
            ?>
								</div>
							</div><!-- .employee-hover -->
						</div>
					<?php 
        }
    }
    wp_reset_query();
    ?>
			</div>
		</div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function xv_gallery_grid_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'limit' => '', 'category' => '', 'thumb_height' => '', 'order' => '', 'style' => '', 'pagination' => ''), $atts));
    ob_start();
    if ($style == '4col') {
        $width = 270;
        $height = 197;
        $col = 'col-sm-6 col-md-3';
    } elseif ($style == '3col') {
        $width = 370;
        $height = 270;
        $col = 'col-sm-6 col-md-4';
    } elseif ($style == '2col') {
        $width = 570;
        $height = 416;
        $col = 'col-sm-6 col-md-6';
    } else {
        $width = 1170;
        $height = 418;
        $col = 'col-sm-6 col-md-12';
    }
    if (!empty($thumb_height)) {
        $height = $thumb_height;
    }
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    query_posts(array('posts_per_page' => $limit, 'post_type' => 'gallery', 'order' => $order, 'gallery_category' => $category, 'paged' => $paged));
    $current_animation_delay = $animation_delay;
    ?>
	<div class="content gallery row">
		<div class="listings clearfix">

			<?php 
    global $post;
    $j = 1;
    $even = 0;
    $counter = 1;
    while (have_posts()) {
        the_post();
        if ($style == 'modern') {
            if ($counter == 6) {
                $pos = 'pull-right';
            } else {
                $pos = '';
            }
            if ($counter == 1 || $counter == 6) {
                $col = ' col-sm-6 col-md-6 ' . $pos;
                $width = 570;
                $height = 450;
                $even = 1;
            } else {
                $width = 270;
                $height = 197;
                $col = ' col-sm-3 col-md-3';
            }
            if ($counter == 10) {
                $counter = 0;
            }
            $counter++;
        }
        //end modern
        $thumb = get_xv_thumbnail($width, $height);
        if (has_post_thumbnail()) {
            $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
            $image_url = '';
            if (isset($image_src[0])) {
                $image_url = $image_src[0];
            }
            //  $thumb = theme_thumb($image_url, $width, $height, 'c');
        } else {
            $image_url = get_xv_thumbnail(600, 600);
        }
        ?>
			<div class="images-box <?php 
        echo sanitize_html_classes($col);
        ?>
 <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
        ?>
>
					<a class="gallery-images" rel="fancybox" href="<?php 
        echo esc_url($image_url);
        ?>
">
						<img src="<?php 
        echo esc_url($thumb);
        ?>
" alt="">
						<span class="bg-images"><i class="icon-search-1"></i></span>
					</a>
				</div>
				<?php 
        $current_animation_delay += $animation_delay_item;
    }
    ?>

		</div>
		<?php 
    if ($pagination == 1) {
        ?>
			<div class="pagination-box container <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
        ?>
>
				<?php 
        if (function_exists('progressive_get_pagination')) {
            progressive_get_pagination();
        }
        ?>
			</div><!-- .pagination-box -->
	<?php 
    }
    ?>
	</div>

	<?php 
    wp_enqueue_script('fancybox');
    wp_reset_query();
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function ts_services_carousel_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'limit' => 8, 'width' => 170, 'height' => 170), $atts));
    ob_start();
    ?>
	<?php 
    if (empty($title)) {
        $title_class = '';
    } else {
        $title_class = 'title-box';
    }
    ?>
	<div class="features-promo carousel-box bottom-padding load overflow <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="<?php 
    echo sanitize_html_class($title_class);
    ?>
">
	        <a class="next" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
				</svg>
	        </a>
	        <a class="prev" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
				</svg>
	        </a>
	        <h1 class="title"><?php 
    echo esc_html($title);
    ?>
</h1>
		</div>
		<div class="clearfix"></div>

		<div class="row">
	        <div class="carousel no-responsive">

				<?php 
    query_posts(array('post_type' => 'service', 'posts_per_page' => $limit));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail($width, $height);
            $icon = get_post_meta(get_the_ID(), 'xv-simple-icon', TRUE);
            ?>
						<div class="text-small features-block col-sm-3 col-md-3">
							<div class="header-box">
								<div class="icon_box">
									<i class="<?php 
            echo esc_attr($icon);
            ?>
"></i>
								</div>
								<h6><?php 
            the_title();
            ?>
</h6>
							</div>
							<div><?php 
            the_content();
            ?>
</div>
						</div>
					<?php 
        }
    }
    wp_reset_query();
    ?>
	        </div>
		</div>
	</div><!-- .features-promo -->

	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function testimonials_posts_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'style' => '', 'bg' => '', 'count' => '3', 'length' => '125', 'blog_text' => '', 'blog_url' => '', 'white' => '', 'text_color' => '', 'color' => ''), $atts));
    $oArgs = ThemeArguments::getInstance('testimonials_posts_func');
    $ts_testimonials_i = (int) $oArgs->get('ts_testimonials_i') + 1;
    $oArgs->set('ts_testimonials_i', $ts_testimonials_i);
    ob_start();
    ?>
	<?php 
    if ($style == 'style4') {
        $attributes = 'data-carousel-autoplay="true" data-carousel-one="true" data-carousel-nav="false"';
    } else {
        $attributes = 'data-carousel-pagination="true" data-carousel-one="true"';
    }
    $title_class = '';
    if (!empty($title)) {
        $title_class = 'title-box';
    }
    ?>

	<div class="respond-carousel <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="carousel-box load overflow" <?php 
    echo $attributes;
    ?>
>
			<div class="<?php 
    echo esc_attr($title_class);
    ?>
">
				<?php 
    if ($style == 'style2' || $style == 'style3') {
        ?>
					<a class="next" href="#">
		                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
							<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
		                </svg>
					</a>
					<a class="prev" href="#">
		                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
							<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
		                </svg>
					</a>
				<?php 
    }
    if (!empty($title)) {
        echo '<h2 class="title">' . $title . '</h2>';
    }
    ?>
			</div>
			<div class="row">
				<?php 
    $data = '';
    if (!empty($text_color)) {
        $data .= 'data-text-color="' . esc_attr($text_color) . '" ';
    }
    if (!empty($color)) {
        $data .= 'data-color="' . esc_attr($color) . '" ';
    }
    ?>
				<div class="carousel testimonials-wrapper" id="testimonials-<?php 
    echo esc_attr($ts_testimonials_i);
    ?>
" <?php 
    echo $data;
    ?>
>

					<?php 
    query_posts(array('post_type' => 'testimonials', 'posts_per_page' => $count));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(84, 84);
            $excerpt = get_xv_excerpt($length);
            ?>
							<?php 
            if ($bg == '1') {
                $bg_style = 'bg-info';
                $bg_class = 'bg';
            } else {
                $bg_style = 'border-info';
                $bg_class = 'border white';
            }
            ?>


							<div class="respond respond-blockquote <?php 
            echo sanitize_html_classes($bg_class);
            ?>
 col-sm-12 col-md-12">
								<div class="description <?php 
            echo esc_attr($bg_style);
            ?>
">
									<blockquote>
										<?php 
            the_content();
            ?>
									</blockquote>
								</div>
								<div class="name">
									<div class="icon">
										<?php 
            if (has_post_thumbnail()) {
                the_post_thumbnail();
            }
            ?>
									</div>
									
									<strong <?php 
            echo $white == 'white' ? 'class="white"' : '';
            ?>
><?php 
            the_title();
            ?>
</strong>
									<div <?php 
            echo $white == 'white' ? 'class="white"' : '';
            ?>
><?php 
            echo get_post_meta(get_the_ID(), 'designation', TRUE);
            ?>
</div>
								</div>
							</div>
							<?php 
        }
    }
    wp_reset_query();
    ?>
				</div>
			</div>
			<div class="clearfix"></div>
			<?php 
    if ($style == 'style1' || $style == 'style3') {
        ?>
				<div class="pagination switches"></div>
			<?php 
    }
    ?>
		</div>
	</div>

	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function ts_client_post_carousel_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'limit' => 8, 'width' => 170, 'height' => 170, 'category' => ''), $atts));
    ob_start();
    ?>
	<?php 
    if (empty($title)) {
        $title_class = '';
    } else {
        $title_class = 'title-box';
    }
    ?>
	<div class="carousel-box load overflow <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="<?php 
    echo sanitize_html_class($title_class);
    ?>
">
			<a class="next" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
				</svg>
			</a>
			<a class="prev" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
				</svg>
			</a>
	<?php 
    if (!empty($title)) {
        echo '<h2 class="title">' . $title . '</h2>';
    }
    ?>
		</div>
		<div class="clearfix"></div>
		<div class="row">
	        <div class="carousel carousel-links">
				<?php 
    query_posts(array('post_type' => 'clients', 'clients_category' => $category, 'posts_per_page' => $limit));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail($width, $height);
            ?>
						<div class="col-sm-3 col-md-2">
							<a>
								<img src="<?php 
            echo esc_url($thumb);
            ?>
" class="img-rounded" alt="">
							</a>
						</div>

						<?php 
        }
    }
    wp_reset_query();
    ?>

	        </div>
		</div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function recent_posts_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'title' => '', 'post_style' => '', 'count' => '3', 'length' => '125', 'blog_text' => '', 'blog_url' => ''), $atts));
    $current_animation_delay = $animation_delay;
    ob_start();
    if ($post_style == 'latest-posts-white') {
        $title_class = "title-white";
    } else {
        $title_class = "";
    }
    ?>
	<?php 
    if (!empty($title)) {
        $t_class = 'title-box';
    } else {
        $t_class = '';
    }
    $current_animation_delay = $animation_delay;
    ?>
	<div class="recent-posts">
		<div class="<?php 
    echo esc_attr($t_class);
    ?>
 <?php 
    echo ts_get_animation_class($animation);
    ?>
">
	<?php 
    if (!empty($blog_text)) {
        ?>
		<a class="btn btn-default" href="<?php 
        echo esc_url($blog_url);
        ?>
"><?php 
        echo esc_html($blog_text);
        ?>
<span class="glyphicon glyphicon-arrow-right"></span></a>
	<?php 
    }
    ?>
			<h2 class="title <?php 
    echo esc_attr($title_class);
    ?>
"><?php 
    echo esc_html($title);
    ?>
</h2>
		</div>
		<ul class="latest-posts <?php 
    echo esc_attr($post_style);
    ?>
">

			<?php 
    $current_animation_delay += $animation_delay_item;
    query_posts(array('post_type' => 'post', 'posts_per_page' => $count));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(84, 84);
            ?>
					<li <?php 
            echo ts_get_animation_class($animation, true);
            ?>
 <?php 
            echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
            ?>
>
						<img class="image img-circle animated" title="" alt="" src="<?php 
            echo esc_url($thumb);
            ?>
">
						<div class="meta">
			                <span><?php 
            the_title();
            ?>
</span>, 
			                <span class="time"><?php 
            the_time('j.m.Y');
            ?>
</span>
						</div>
						<div class="description">
			                <a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
">
								<?php 
            echo wp_kses_post(get_xv_excerpt($length));
            ?>
			                </a>
						</div>
					</li>
					<?php 
        }
    }
    wp_reset_query();
    ?>
  
		</ul>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function ts_team_post_loop_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'title' => '', 'limit' => 8, 'width' => 270, 'height' => 270), $atts));
    ob_start();
    $current_animation_delay = $animation_delay;
    ?>

	<div class="bottom-padding bottom-padding-min">
	<?php 
    if (!empty($title)) {
        ?>
		<div class="title-box  <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
        ?>
>
			<h2 class="title"><?php 
        echo esc_html($title);
        ?>
 </h2>
		</div>
		<div class="clearfix"></div>  
	<?php 
    }
    ?>
		<div class="row text-center">
			<?php 
    query_posts(array('post_type' => 'team', 'posts_per_page' => $limit));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail($width, $height);
            $designation = get_post_meta(get_the_ID(), 'xv_member_designation', TRUE);
            $about = get_post_meta(get_the_ID(), 'xv_member_about', TRUE);
            $email = get_post_meta(get_the_ID(), 'xv_member_email', TRUE);
            $phone = get_post_meta(get_the_ID(), 'xv_member_phone', TRUE);
            $facebook = esc_url(get_post_meta(get_the_ID(), 'xv_member_facebook', TRUE));
            $twitter = esc_url(get_post_meta(get_the_ID(), 'xv_member_twiiter', TRUE));
            $gplus = esc_url(get_post_meta(get_the_ID(), 'xv_member_gplus', TRUE));
            $linkedin = esc_url(get_post_meta(get_the_ID(), 'xv_member_linkedin', TRUE));
            ?>
			        <div class="col-sm-3 col-md-3 employee fixed-width rotation <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($current_animation_delay += $animation_delay_item, $animation_iteration);
            ?>
>
						<div class="default">
							<div class="image">
								<img src="<?php 
            echo esc_url($thumb);
            ?>
" alt="">
							</div>
							<div class="description">
								<div class="vertical">
									<h3 class="name"><?php 
            the_title();
            ?>
</h3>
									<div class="role"><?php 
            echo esc_html($designation);
            ?>
</div> 
								</div>
							</div>
						</div>
						<div class="employee-hover">
							<h3 class="name"><?php 
            the_title();
            ?>
</h3>
							<div class="role"><?php 
            echo esc_html($designation);
            ?>
</div>
							<div class="image">
								<img src="<?php 
            echo esc_url($thumb);
            ?>
" alt="">
							</div>
							<div>
								<p><?php 
            echo wp_kses_post($about);
            ?>
</p>
								<div class="contact"><b><?php 
            _e('Email', 'progressive');
            ?>
: </b><?php 
            echo esc_html($email);
            ?>
</div>
								<div class="contact"><b><?php 
            _e('Phone', 'progressive');
            ?>
: </b><?php 
            echo esc_html($phone);
            ?>
</div>
							</div>

							<div class="social">
								<?php 
            if (!empty($facebook)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-facebook' href='" . esc_url($facebook) . "'></a></div>";
            }
            if (!empty($twitter)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-twitter' href='" . esc_url($twitter) . "'></a></div>";
            }
            if (!empty($gplus)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-gplus' href='" . esc_url($gplus) . "'></a></div>";
            }
            if (!empty($linkedin)) {
                echo "<div class='item'><a class='sbtnf sbtnf-rounded color color-hover icon-linkedin' href='" . esc_url($linkedin) . "'></a></div>";
            }
            ?>
							</div>
						</div><!-- .employee-hover -->
			        </div>
					<?php 
        }
    }
    wp_reset_query();
    ?>
			<div class="clearfix"></div>
		</div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function ts_portfolio_carousel2_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => 'Carousel Title', 'category' => '', 'limit' => '', 'width' => 270, 'height' => 197), $atts));
    ob_start();
    ?>

	<?php 
    if (empty($title)) {
        $title_class = '';
    } else {
        $title_class = 'title-box';
    }
    ?>

	<div class="carousel-box load overflow <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="title-box">
			<a class="next" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
				</svg>
			</a>
			<a class="prev" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
				</svg>
			</a>
			<?php 
    if (!empty($title)) {
        ?>
						<h2 class="title"><?php 
        echo esc_html($title);
        ?>
</h2>
			<?php 
    }
    ?>
		</div>
	    <div class="clearfix"></div>

	    <div class="row">
			<div class="carousel no-responsive">
				<?php 
    $terms = get_terms("portfolio_category");
    $count = count($terms);
    $adcount = 1;
    $term = get_terms("portfolio_category");
    query_posts(array('post_type' => 'portfolio', 'posts_per_page' => $limit, 'portfolio_category' => $category, 'post_status' => 'publish'));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(370, 270);
            ?>
					<div class="col-xs-12 col-sm-4 col-md-3">
						<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" class="work">
							<img src="<?php 
            echo esc_url($thumb);
            ?>
"  alt="">
								<span class="shadow"></span>
								<div class="bg-hover"></div>
								<div class="work-title">
									<h3 class="title"><?php 
            the_title();
            ?>
</h3>
									<div class="description"><?php 
            echo strip_tags(get_the_term_list($post->ID, 'portfolio_category', '', ', '));
            ?>
</div>
								</div>
						</a>
					</div>
						<?php 
        }
    }
    wp_reset_query();
    ?>
  
			</div>
	    </div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
	<div class="timeline-icon bg-primary">
		<div class="livicon" data-n="camera" data-c="#fff" data-hc="0" data-s="22"></div>
	</div>

	<div class="timeline-content border border-primary" data-appear-animation="<?php 
echo esc_attr(ts_get_timeline_fadein());
?>
">
		<h2 class="entry-title">
			<a href="<?php 
echo esc_url(get_the_permalink());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
"><?php 
the_title();
?>
</a>
		</h2>
		<div class="entry-content">
			<img src="<?php 
echo get_xv_thumbnail(451, 329);
?>
" alt="<?php 
echo esc_attr(get_the_title());
?>
"/>
		</div>
	</div>
</article><!-- .post -->
function posts_slider_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'count' => '3', 'length' => '125', 'blog_text' => '', 'blog_url' => '', 'category' => '', 'style' => '', 'autoplay' => ''), $atts));
    ob_start();
    query_posts(array('post_type' => 'post', 'posts_per_page' => $count, 'category_name' => $category));
    ?>

	<?php 
    if ($style == 'normal' || $style == 'wide') {
        if ($style == 'normal') {
            echo '<div class="content">';
            $width = 720;
            $height = 442;
        } else {
            $width = 1170;
            $height = 550;
        }
        if (!empty($title)) {
            echo '<h2 class="title">' . $title . '</h2>';
        }
        ?>
		<div class="slider progressive-slider load <?php 
        echo ts_get_animation_class($animation);
        ?>
" data-carousel-autoplay="<?php 
        echo $autoplay == 'enabled' ? 'true' : 'false';
        ?>
" <?php 
        echo ts_get_animation_data_class($animation_delay, $animation_iteration);
        ?>
>
			<div class="container"> 
				<div class="row">
					<div class="sliders-box">
						<?php 
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $thumb = get_xv_thumbnail($width, $height);
                ?>
							<div class="col-sm-12 col-md-12">
								<div class="slid row">
									<div class="col-sm-12 col-md-12">
										<img class="slid-img" src="<?php 
                echo esc_url($thumb);
                ?>
" alt="">
									</div>

									<div class="slid-content col-sm-4 col-md-4">
										<h1 class="title"><?php 
                the_title();
                ?>
</h1>
										<p class="descriptions"><?php 
                echo get_xv_excerpt($length);
                ?>
</p>
										<?php 
                if ($style == 'wide') {
                    ?>
 
											<a href="<?php 
                    echo esc_url(get_the_permalink());
                    ?>
" class="btn btn-block btn-default btn-lg"><?php 
                    _e('More', 'progressive');
                    ?>
</a>
										<?php 
                }
                ?>
									</div>
								</div>
							</div>
							<?php 
            }
        }
        wp_reset_query();
        ?>
  
					</div><!-- .sliders-box -->

					<div class="slider-nav col-sm-4 col-md-4">
						<div class="nav-box">
							<a class="next" href="#">
								<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
									<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#838383" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
								</svg>
							</a>
							<a class="prev" href="#">
								<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
									<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#838383" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
								</svg>
							</a>
							<div class="pagination switches"></div> 
						</div>
					</div>

				</div>
			</div> <!-- .container -->
		</div> <!-- .progressive-slider -->
		<?php 
        if ($style == 'normal') {
            echo '</div>';
        }
    } else {
        //end normal or wide
        ?>

		<?php 
        $attributes = 'data-carousel-autoplay="' . ($autoplay == 'enabled' ? 'true' : '') . '" ';
        if ($style == 'style4') {
            $attributes .= 'data-carousel-one="true" data-carousel-nav="false"';
        } else {
            $attributes .= 'data-carousel-pagination="true" data-carousel-one="true"';
        }
        ?>

		<div class="carousel-box posts-carousel load overflow <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($animation_delay, $animation_iteration);
        ?>
 <?php 
        echo $attributes;
        ?>
>
			<div class="title-box">
				<?php 
        if ($style == 'style2' || $style == 'style3') {
            ?>
			        <a class="next" href="#">
						<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
							<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
						</svg>
			        </a>
			        <a class="prev" href="#">
						<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
							<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
						</svg>
			        </a>
				<?php 
        }
        ?>
				<?php 
        if (!empty($title)) {
            echo '<h2 class="title">' . $title . '</h2>';
        }
        ?>
			</div>

			<div class="clearfix"></div>

			<div class="row">
		        <div class="carousel no-responsive">

					<?php 
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>

							<div class="post">
								<h2 class="entry-title"><a href="<?php 
                echo esc_url(get_the_permalink());
                ?>
"><?php 
                the_title();
                ?>
</a></h2>
								<div class="entry-content">
									<?php 
                echo get_xv_excerpt($length);
                ?>
								</div>

								<footer class="entry-meta">
									<span class="autor-name"><?php 
                the_author();
                ?>
</span>,
									<span class="time"><?php 
                the_time('j.m.Y');
                ?>
</span>
									<span class="separator">|</span>
									<span class="meta"><?php 
                _e('Posted in', 'progressive');
                ?>
 <?php 
                echo get_the_category_list(__(', ', 'progressive'));
                ?>
</span>

									<span class="comments-link pull-right">
										<a href="<?php 
                echo esc_url(get_the_permalink());
                ?>
"><?php 
                comments_number('0', '1', '%');
                ?>
 <?php 
                _e('comment(s)', 'progressive');
                ?>
</a>
									</span>
								</footer>
							</div>


							<?php 
            }
        }
        wp_reset_query();
        ?>
  
		        </div>
			</div>
			<div class="clearfix"></div>
		<?php 
        if ($style == 'style1' || $style == 'style3') {
            ?>
				<div class="pagination switches"></div>
		<?php 
        }
        ?>
		</div>


	<?php 
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Example #16
0
		<h2 class="entry-title">
			<a href="<?php 
echo esc_url(get_the_permalink());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
"><?php 
the_title();
?>
</a>
		</h2>

		<div class="entry-content">
			<?php 
if (has_post_thumbnail()) {
    ?>
				<img src="<?php 
    echo get_xv_thumbnail(451, 158);
    ?>
" />
			<?php 
}
?>
			<p><?php 
the_excerpt();
?>
</p>
		</div>
	</div>
</article><!-- .post -->
Example #17
0
function xv_gallery_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'limit' => '3', 'category' => '', 'width' => '', 'height' => '', 'style' => ''), $atts));
    global $post;
    ob_start();
    if ($style == 'small') {
        $width = 270;
        $height = 135;
        $col = 'col-sm-4 col-md-3';
    } else {
        $width = 270;
        $height = 135;
        $col = 'col-sm-4 col-md-4';
    }
    $current_animation_delay = $animation_delay;
    ?>
  

	<div class="bottom-padding load">
		<div class="clearfix"></div>
		<div class="row">
			<div class="no-responsive gallery">

				<?php 
    $wp_query = new WP_Query();
    $args = array('numberposts' => '', 'posts_per_page' => $posts_per_page, 'offset' => 0, 'gallery_category' => $category, 'orderby' => 'date', 'order' => 'ASC', 'post_type' => 'gallery', 'post_status' => 'publish');
    $wp_query->query($args);
    if ($wp_query->have_posts()) {
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            $thumb = get_xv_thumbnail($width, $height);
            if (has_post_thumbnail()) {
                $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
                $image_url = '';
                if (isset($image_src[0])) {
                    $image_url = $image_src[0];
                }
                //  $thumb = theme_thumb($image_url, $width, $height, 'c');
            } else {
                $image_url = get_xv_thumbnail(600, 600);
            }
            ?>
						<div class="<?php 
            echo esc_attr($col);
            ?>
 <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
            ?>
>
							<a class="gallery-images" rel="fancybox" href="<?php 
            echo esc_url($image_url);
            ?>
">
								<img src="<?php 
            echo esc_url($thumb);
            ?>
" alt="">
								<span class="bg-images"><i class="icon-search"></i></span>
							</a>
						</div>

			<?php 
            $current_animation_delay += $animation_delay_item;
        }
    }
    wp_reset_postdata();
    ?>
    
	        </div>
		</div>
	</div> 


	<?php 
    wp_enqueue_script('fancybox');
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Example #18
0
function ts_post_list_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'category' => '', 'limit' => 1, 'carousel_pagination' => 'yes', 'carousel_navigation' => 'yes', 'image_align' => 'left'), $atts));
    if (empty($limit)) {
        $limit = 1;
    }
    $html = '';
    $args = array('numberposts' => "", 'posts_per_page' => $limit, 'offset' => 0, 'cat' => $category, 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'paged' => 1, 'post_status' => 'publish');
    ob_start();
    $the_query = new WP_Query($args);
    $html = '';
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $slider = '';
            $post_gallery = ts_get_post_opt('post_gallery');
            if (is_array($post_gallery) && count($post_gallery) > 0) {
                foreach ($post_gallery as $slide) {
                    $image = theme_thumb($slide['image'], 370, 270, 'c');
                    if (!empty($image)) {
                        $slider .= '<img src="' . esc_url($image) . '" alt="" title="" />';
                    }
                }
            }
            ?>
			<div class="bottom-padding <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($animation_delay, $animation_iteration);
            ?>
>
				<div class="post carousel row no-responsive">
					<div class="images-box col-xs-12 col-sm-4 col-md-4 <?php 
            echo $image_align == 'right' ? 'pull-right' : '';
            ?>
">
						<?php 
            if (!empty($slider)) {
                ?>

							<div class="carousel-box load" data-carousel-pagination="<?php 
                echo $carousel_pagination == 'yes' ? 'true' : 'false';
                ?>
" data-carousel-nav="<?php 
                echo $carousel_navigation == 'yes' ? 'true' : 'false';
                ?>
" data-carousel-one="true">
								<div class="carousel"> 
									<?php 
                echo $slider;
                ?>
								</div>
								<div class="nav-box">
									<a class="next" href="#">
										<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
											<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
										</svg>
									</a>
									<a class="prev" href="#">
										<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
											<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
										</svg>
									</a>
								</div>
								<div class="clearfix"></div>
								<div class="pagination switches"></div>
							</div>
						<?php 
            } else {
                ?>
							<img src="<?php 
                echo esc_url(get_xv_thumbnail(370, 270));
                ?>
" class="single-image" />
						<?php 
            }
            ?>
					</div>

					<div class="col-xs-12 col-sm-8 col-md-8">
						<h2 class="entry-title"><a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" title="<?php 
            echo esc_attr(get_the_title());
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
						<div class="entry-content">
							<?php 
            ts_the_excerpt_theme(155);
            ?>
						</div>

						<div class="entry-meta">
							<span class="autor-name"><?php 
            the_author();
            ?>
</span>,
							<span class="time"><?php 
            the_time('j.m.Y');
            ?>
</span>
							<span class="separator">|</span>
							<span class="meta"><?php 
            _e('Posted in', 'progressive');
            ?>
 <?php 
            echo get_the_category_list(', ');
            ?>
</span>
							<span class="comments-link pull-right">
								<a href="<?php 
            comments_link();
            ?>
"><?php 
            comments_number('0', '1', '%');
            ?>
 <?php 
            _e('comment(s)', 'progressive');
            ?>
</a>
							</span>
						</div>
					</div>
					<div class="clearfix"></div>
				</div><!-- .post -->
			</div>
			<?php 
        }
        wp_reset_postdata();
    }
    $html = ob_get_contents();
    ob_end_clean();
    return $html;
}
        } else {
            if (has_post_thumbnail()) {
                ?>
					<div class="entry-thumb"><img src="<?php 
                echo esc_url(get_xv_thumbnail(870, 400));
                ?>
" /></div>
				<?php 
            }
        }
        break;
    default:
        if (has_post_thumbnail()) {
            ?>
					<div class="entry-thumb"><img src="<?php 
            echo esc_url(get_xv_thumbnail(870, 400));
            ?>
" /></div>
					<?php 
        }
}
if (get_post_format() == 'quote') {
    ?>
			<blockquote>
		<?php 
}
the_content();
if (get_post_format() == 'quote') {
    ?>
			</blockquote>
		<?php 
function ts_client_posts_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'limit' => '', 'width' => 170, 'height' => 103, 'category' => ''), $atts));
    ob_start();
    ?>


	<?php 
    if (!empty($title)) {
        ?>
		<div class="title-box <?php 
        echo ts_get_animation_class($animation);
        ?>
" <?php 
        echo ts_get_animation_data_class($animation_delay, $animation_iteration);
        ?>
>
		    <h2 class="title"><?php 
        echo esc_html($title);
        ?>
</h2>
		</div>
	<?php 
    }
    ?>
    


	<div class="row bottom-padding <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
	<?php 
    query_posts(array('post_type' => 'clients', 'clients_category' => $category, 'posts_per_page' => $limit));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail($width, $height);
            ?>
			    <div class="col-xs-6 col-sm-3 col-md-2 text-center">
					<a title="<?php 
            the_title();
            ?>
" data-placement="top" data-toggle="tooltip" class="client" href="#" data-original-title="Yelp">
						<img src="<?php 
            echo esc_url($thumb);
            ?>
" class="img-rounded" alt="">
					</a>
			    </div>

		<?php 
        }
    } else {
    }
    wp_reset_query();
    ?>

	</div>

	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
</div>
<?php 
php;
?>

<div class="banner-set banner-set-mini banner-set-no-pagination load">
	<div class="container">
		<div class="banners">
			<?php 
$width = 127;
$height = 79;
query_posts(array('post_type' => 'product'));
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $thumb = get_xv_thumbnail($width, $height);
        ?>
					<a href="<?php 
        the_permalink();
        ?>
" class="banner">
						<img src="<?php 
        echo esc_url($thumb);
        ?>
" alt="">
						<h2 class="title"><?php 
        the_title();
        ?>
</h2>
					</a>
					<?php 
function ts_portfolio_carousel_func($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'carousel_style' => '', 'category' => '', 'limit' => '', 'width' => 270, 'height' => 197), $atts));
    ob_start();
    ?>


	<div class="carousel-box load overflow" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-autoplay="true">
		<div class="clearfix"></div>

		<div class="row">
			<div class="carousel no-responsive">
				<?php 
    $current_animation_delay = $animation_delay;
    $term = get_terms("portfolio_category");
    query_posts(array('post_type' => 'portfolio', 'posts_per_page' => $limit, 'portfolio_category' => $category, 'post_status' => 'publish'));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail($width, $height);
            ?>
  
					<div class="col-sm-4 col-md-3 <?php 
            echo ts_get_animation_class($animation);
            ?>
" <?php 
            echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
            ?>
>
						<a href="portfolio-single.html" class="work">
							<img src="<?php 
            echo esc_url($thumb);
            ?>
"  alt="">
							<span class="shadow"></span>
							<div class="bg-hover"></div>
							<div class="work-title">
								<h3 class="title"><?php 
            the_title();
            ?>
</h3>
								<div class="description"><?php 
            echo strip_tags(get_the_term_list($post->ID, 'portfolio_category', '', ', '));
            ?>
</div>
							</div>
						</a>
					</div>
						<?php 
            $current_animation_delay += $animation_delay_item;
        }
    }
    wp_reset_query();
    ?>
			</div>
		</div>
		<div>
			<div class="pagination switches <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
    ?>
></div>
		</div>
	</div>
	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function xv_gallery_carousel_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'category' => '', 'title' => '', 'height' => '', 'style' => ''), $atts));
    ob_start();
    ?>
	<?php 
    $terms = get_terms("gallery_category");
    $count = count($terms);
    if (empty($title)) {
        $title_class = '';
    } else {
        $title_class = 'title-box';
    }
    ?>

	<div class="carousel-box load overflow <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
		<div class="title-box">
			<a class="next" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon>
				</svg>
			</a>
			<a class="prev" href="#">
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve">
					<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon>
				</svg>
			</a>
			<?php 
    if (!empty($title)) {
        ?>
				<h2 class="title"><?php 
        echo esc_html($title);
        ?>
</h2>
			<?php 
    }
    ?>
		</div>
		<div class="clearfix"></div>
		<div class="row">
			<div class="carousel gallery">

				<?php 
    $terms = get_terms("gallery_category");
    $count = count($terms);
    $post_per_page = 2;
    global $post;
    $adcount = 1;
    query_posts(array('post_type' => 'gallery', 'gallery_category' => $category, 'orderby' => 'date', 'order' => 'ASC'));
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $thumb = get_xv_thumbnail(270, 135);
            if (has_post_thumbnail()) {
                $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
                $image_url = '';
                if (isset($image_src[0])) {
                    $image_url = $image_src[0];
                }
                //  $thumb = theme_thumb($image_url, $width, $height, 'c');
            } else {
                $image_url = get_xv_thumbnail(600, 600);
            }
            ?>
						<div class="col-sm-4 col-md-3">
							<a class="gallery-images" rel="fancybox" href="<?php 
            echo esc_url($image_url);
            ?>
">
								<img src="<?php 
            echo esc_url($thumb);
            ?>
" alt="">
									<span class="bg-images"><i class="icon-search-1"></i></span>
							</a>
						</div>

					<?php 
        }
    }
    wp_reset_query();
    ?>
    
			</div>
		</div>
	</div>

	<?php 
    wp_enqueue_script('fancybox');
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
function xv_portfolio_filter_func($atts, $content = null)
{
    extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'limit' => '', 'limit2' => '300', 'style' => '', 'filter_style' => '', 'filter' => 'enabled', 'year_filter' => 'enabled'), $atts));
    ob_start();
    if ($style == '4col') {
        $width = 270;
        $height = 197;
        $col = 'col-sm-4 col-md-3';
        $wrapper_class = 'portfolio';
    } elseif ($style == '3col') {
        $width = 370;
        $height = 270;
        $col = 'col-sm-4 col-md-4';
        $wrapper_class = 'portfolio';
    } elseif ($style == '2col') {
        $width = 570;
        $height = 416;
        $col = 'col-sm-4 col-md-6';
        $wrapper_class = 'portfolio';
    } else {
        $width = 770;
        $height = 270;
        $col = 'col-sm-4 col-md-12';
        $wrapper_class = 'portfolio';
    }
    $current_animation_delay = $animation_delay;
    if (!empty($thumb_height)) {
        $height = $thumb_height;
    }
    $args = array('post_type' => 'portfolio', 'posts_per_page' => $limit);
    $terms = get_terms("portfolio_category");
    $years = array();
    if ($year_filter == 'enabled') {
        foreach ($terms as $term) {
            $args['portfolio_category'] = $term->slug;
            query_posts($args);
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $data = get_post_meta(get_the_ID(), 'data', TRUE);
                    if ($data) {
                        $dataobj = DateTime::createFromFormat('Y, m, d', $data);
                        $year = $dataobj->format('Y');
                        $years[$year] = $year;
                    }
                }
            }
        }
        sort($years);
    }
    $year_filter_exists = false;
    ?>
	<div class="content <?php 
    echo esc_attr($wrapper_class);
    ?>
">
		<div class="row">
			<div class="col-sm-12 col-md-8 btn-group <?php 
    echo esc_attr($filter_style);
    ?>
 <?php 
    echo ts_get_animation_class($animation);
    ?>
" <?php 
    echo ts_get_animation_data_class($animation_delay, $animation_iteration);
    ?>
>
				<?php 
    if ($filter == 'enabled') {
        ?>
					<div class="filter-buttons filter-list">
						<button type="button" class="dropdown-toggle" data-toggle="dropdown">
							<?php 
        _e('All Works', 'progressive');
        ?>
 <span class="caret"></span>
						</button>
						<ul class="dropdown-menu" role="menu">
							<li><a href="#" data-filter="*" class="active"><?php 
        _e('All Works', 'progressive');
        ?>
</a></li>
							<?php 
        foreach ($terms as $term) {
            ?>
								<li><a href="#" data-filter=".<?php 
            echo esc_attr($term->slug);
            ?>
"><?php 
            echo esc_html($term->name);
            ?>
</a></li>
							<?php 
        }
        ?>
						</ul>
						<div class="clearfix"></div>
					</div>
				<?php 
    } else {
        if ($year_filter == 'enabled' && count($years) > 0) {
            $year_filter_exists = true;
            ?>
					<div class="year-regulator year-regulator-wrapper">
						<div class="label"><?php 
            _e('Year:', 'progressive');
            ?>
</div>
						<div class="layout-slider">
							<input class="year-filter-slider" type="slider" name="year" value="<?php 
            echo esc_attr($years[0]);
            ?>
;<?php 
            echo esc_attr(end($years));
            ?>
" class="form-control">
						</div>
						<div class="clearfix"></div>
					</div>
				<?php 
        }
    }
    ?>
			</div><!-- .filter-buttons -->

			<div class="col-sm-6 col-md-4">
				<?php 
    if ($year_filter_exists === false && $year_filter == 'enabled' && count($years) > 0) {
        ?>
					<div class="year-regulator">
						<div class="label"><?php 
        _e('Year:', 'progressive');
        ?>
</div>
						<div class="layout-slider">
							<input class="year-filter-slider" type="slider" name="year" value="<?php 
        echo esc_attr($years[0]);
        ?>
;<?php 
        echo esc_attr(end($years));
        ?>
" class="form-control">
						</div>
						<div class="clearfix"></div>
					</div>
				<?php 
    }
    ?>
			</div><!-- .price-regulator -->
		</div>
		<div class="row filter-elements">
			<?php 
    $current_animation_delay += $animation_delay_item;
    ?>
			<?php 
    global $post;
    if ($style == '1col') {
        foreach ($terms as $term) {
            $args['portfolio_category'] = $term->slug;
            if ($year_filter == 'enabled' && count($years) > 0) {
                $args['meta_query'] = array(array('key' => 'data', 'value' => array(''), 'compare' => 'NOT IN'));
            }
            query_posts($args);
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $thumb = get_xv_thumbnail($width, $height);
                    $excerpt = get_xv_excerpt($limit2);
                    $data = get_post_meta(get_the_ID(), 'data', TRUE);
                    $year = '';
                    if ($data) {
                        $dataobj = DateTime::createFromFormat('Y, m, d', $data);
                        $year = $dataobj->format('Y');
                    }
                    ?>

							<div class="work-one <?php 
                    echo esc_attr($term->slug);
                    ?>
 <?php 
                    echo esc_attr($year);
                    ?>
 <?php 
                    echo ts_get_animation_class($animation);
                    ?>
">
								<div class="work-title col-sm-4 col-md-4">
									<h3 class="title"><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h3>
									<div class="description"><?php 
                    echo esc_html($term->name);
                    ?>
</div>
									<p><?php 
                    echo wp_kses_post($excerpt);
                    ?>
</p>
								</div>
								<div class="col-sm-8 col-md-8">
									<a href="<?php 
                    echo esc_url(get_the_permalink());
                    ?>
" class="work-image">
										<img src="<?php 
                    echo esc_url($thumb);
                    ?>
"  alt="" />
									</a>
								</div>
							</div>

							<?php 
                    $current_animation_delay += $animation_delay_item;
                }
            }
        }
        wp_reset_query();
    } else {
        $terms = get_terms("portfolio_category");
        $count = count($terms);
        foreach ($terms as $term) {
            $args['portfolio_category'] = $term->slug;
            if ($year_filter == 'enabled' && count($years) > 0) {
                $args['meta_query'] = array(array('key' => 'data', 'value' => array(''), 'compare' => 'NOT IN'));
            }
            query_posts($args);
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $thumb = get_xv_thumbnail($width, $height);
                    $data = get_post_meta(get_the_ID(), 'data', TRUE);
                    $year = '';
                    if ($data) {
                        $dataobj = DateTime::createFromFormat('Y, m, d', $data);
                        $year = $dataobj->format('Y');
                    }
                    ?>

							<div class="work-element <?php 
                    echo esc_attr($term->slug);
                    ?>
 <?php 
                    echo esc_attr($year);
                    ?>
 <?php 
                    echo esc_attr($col);
                    ?>
 <?php 
                    echo ts_get_animation_class($animation);
                    ?>
" <?php 
                    echo ts_get_animation_data_class($current_animation_delay, $animation_iteration);
                    ?>
>
								<a href="<?php 
                    the_permalink();
                    ?>
" class="work">
									<img src="<?php 
                    echo esc_url($thumb);
                    ?>
"  alt="" />
									<span class="shadow"></span>
									<div class="bg-hover"></div>
									<div class="work-title">
										<h3 class="title"><?php 
                    the_title();
                    ?>
</h3>
										<div class="description"><?php 
                    echo esc_html($term->name);
                    ?>
</div>
									</div>
								</a>
							</div><!-- .work-element -->

							<?php 
                    $current_animation_delay += $animation_delay_item;
                }
            }
        }
        wp_reset_query();
        ?>
		        <div class="clearfix"></div>
			</div>
		</div> 

	<?php 
    }
    ?>


	<?php 
    wp_enqueue_script('isotope');
    wp_enqueue_script('jshashtable');
    wp_enqueue_script('jquery.numberformatter');
    wp_enqueue_script('price-regulator');
    wp_enqueue_script('jquery.dependClass');
    wp_enqueue_script('draggable');
    wp_enqueue_script('jquery.slider');
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}