Example #1
0
function vc_widget_func($atts, $content = null)
{
    extract(shortcode_atts(array('post_type' => '', 'image_size' => '', 'carousel' => '', 'carousel_autoheight' => '', 'carousel_margin' => '', 'carousel_navi' => '', 'carousel_dots_navi' => '', 'carousel_autoplay' => '', 'carousel_autoplaytimeout' => '', 'carousel_autoplayhoverpause' => '', 'carousel_loop' => '', 'columns' => '', 'items' => '', 'cat_filter' => '', 'thumbnails' => '', 'caption' => '', 'order' => '', 'orderby' => ''), $atts));
    if (empty($post_type)) {
        $post_type = 'post';
    }
    if (empty($image_size)) {
        $image_size = 'theme-size-3x2';
    }
    if (empty($columns)) {
        $columns = '3';
    }
    if (empty($orderby)) {
        $orderby = 'date';
    }
    if (empty($order)) {
        $order = 'DESC';
    }
    if ($post_type == "post") {
        $post_type = "post";
        $cat_terms = "category";
    } else {
        $post_type = "portfolio";
        $cat_terms = "portfolio_category";
    }
    if ($items) {
        $posts_per_page = '&posts_per_page=' . $items . '';
    } else {
        $posts_per_page = '&posts_per_page=-1';
    }
    if ($post_type == "portfolio") {
        $category_filter = '&portfolio_category=' . $cat_filter;
    } else {
        $category_filter = '&category_name=' . $cat_filter;
    }
    if ($carousel) {
        if ($columns == "3") {
            $columns = "4";
        } elseif ($columns == "4") {
            $columns = "3";
        } elseif ($columns == "6") {
            $columns = "2";
        }
        global $shortcode_atts;
        $shortcode_atts = array('carousel_autoheight' => $carousel_autoheight, 'carousel_margin' => $carousel_margin, 'carousel_navi' => $carousel_navi, 'carousel_dots_navi' => $carousel_dots_navi, 'carousel_autoplay' => $carousel_autoplay, 'carousel_autoplaytimeout' => $carousel_autoplaytimeout, 'carousel_autoplayhoverpause' => $carousel_autoplayhoverpause, 'carousel_loop' => $carousel_loop, 'columns' => $columns);
        lpd_owl_carousel();
        global $the_post_widget_ID;
        $the_post_widget_ID = rand();
    }
    ob_start();
    ?>
	
						<div class="post-widget">
							<div class="row">
							<?php 
    if ($carousel) {
        ?>
<div class="col-md-12 owl-carousel-<?php 
        echo esc_attr($the_post_widget_ID);
        ?>
"><?php 
    }
    ?>
	
	
						<?php 
    $query = new WP_Query();
    ?>
						<?php 
    $query->query('post_type=' . $post_type . '' . $posts_per_page . '' . $category_filter . '&orderby=' . $orderby . '&order=' . $order . '');
    ?>
							
                        <?php 
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>
                        
						<?php 
            $video = lpd_parse_video(get_post_meta(get_the_ID(), 'video_post_meta', true));
            ?>
						<?php 
            $link = get_post_meta(get_the_ID(), 'link_post_meta', true);
            ?>
						
						<?php 
            $gallery_type = get_post_meta(get_the_ID(), 'portfolio_options_select', true);
            ?>
						<?php 
            $terms = get_the_terms(get_the_ID(), $cat_terms);
            ?>
						
						<?php 
            if ($post_type == "portfolio") {
                ?>
							<?php 
                $header_image = wp_get_attachment_image_src(get_post_meta(get_the_ID(), 'portfolio_header_image', true), $image_size);
                ?>
						<?php 
            } else {
                ?>
							<?php 
                $header_image = wp_get_attachment_image_src(get_post_meta(get_the_ID(), 'post_header_image', true), $image_size);
                ?>
						<?php 
            }
            ?>
						
						  
	<?php 
            if (!$carousel) {
                ?>
<div class="col-md-<?php 
                echo esc_attr($columns);
                ?>
"><?php 
            }
            ?>
		<div class="lpd-post-widget">
		<?php 
            if (!$thumbnails) {
                ?>
			<?php 
                if ($link) {
                    ?>
		        <?php 
                    if (has_post_thumbnail()) {
                        ?>
					<a href="<?php 
                        echo esc_url($link);
                        ?>
" class="pw-thumbnail">
						<img alt="<?php 
                        the_title();
                        ?>
" class="img-responsive" src="<?php 
                        $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), $image_size);
                        echo esc_url($image[0]);
                        ?>
"/>
						<span class="post-type-icon link"></span>
					</a>
				<?php 
                    } elseif ($header_image) {
                        ?>
					<a href="<?php 
                        the_permalink();
                        ?>
" class="pw-thumbnail">
						<img alt="<?php 
                        the_title();
                        ?>
" class="img-responsive" src="<?php 
                        echo esc_url($header_image[0]);
                        ?>
"/>
						<span class="post-type-icon link"></span>
					</a>
				<?php 
                    } else {
                        ?>
			        <a href="<?php 
                        echo esc_url($link);
                        ?>
" class="pw-thumbnail">
			        	<img class="img-responsive" alt="<?php 
                        the_title();
                        ?>
" src="<?php 
                        echo THEME_ASSETS;
                        ?>
img/no-image.png"/>
			        	<span class="post-type-icon link"></span>
					</a>
		        <?php 
                    }
                    ?>
		    <?php 
                } elseif ($video) {
                    ?>
		        <?php 
                    if (has_post_thumbnail()) {
                        ?>
					<a href="<?php 
                        the_permalink();
                        ?>
" class="pw-thumbnail">
						<img alt="<?php 
                        the_title();
                        ?>
" class="img-responsive" src="<?php 
                        $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), $image_size);
                        echo esc_url($image[0]);
                        ?>
"/>
						<span class="post-type-icon video"></span>
					</a>
				<?php 
                    } elseif ($header_image) {
                        ?>
					<a href="<?php 
                        the_permalink();
                        ?>
" class="pw-thumbnail">
						<img alt="<?php 
                        the_title();
                        ?>
" class="img-responsive" src="<?php 
                        echo esc_url($header_image[0]);
                        ?>
"/>
						<span class="post-type-icon video"></span>
					</a>
				<?php 
                    } else {
                        ?>
			        <a href="<?php 
                        the_permalink();
                        ?>
" class="pw-thumbnail">
			        	<img class="img-responsive" alt="<?php 
                        the_title();
                        ?>
" src="<?php 
                        echo THEME_ASSETS;
                        ?>
img/no-image.png"/>
			        	<span class="post-type-icon video"></span>
					</a>
		        <?php 
                    }
                    ?>
		    <?php 
                } elseif (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
                    ?>
				<a href="<?php 
                    the_permalink();
                    ?>
" class="pw-thumbnail">
					<?php 
                    if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
                        ?>
					<img alt="<?php 
                        the_title();
                        ?>
" class="img-responsive" src="<?php 
                        $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), $image_size);
                        echo esc_url($image[0]);
                        ?>
"/>
					<span class="post-type-icon"></span>
					<?php 
                    }
                    ?>
				</a>
			<?php 
                } else {
                    ?>
				<?php 
                    if ($header_image) {
                        ?>
					<a href="<?php 
                        the_permalink();
                        ?>
" class="pw-thumbnail">
						<img alt="<?php 
                        the_title();
                        ?>
" class="img-responsive" src="<?php 
                        echo esc_url($header_image[0]);
                        ?>
"/>
						<span class="post-type-icon"></span>
					</a>
				<?php 
                    } else {
                        ?>
		        <a href="<?php 
                        the_permalink();
                        ?>
" class="pw-thumbnail">
		        	<img class="img-responsive" alt="<?php 
                        the_title();
                        ?>
" src="<?php 
                        echo THEME_ASSETS;
                        ?>
img/no-image.png"/>
		        	<span class="post-type-icon"></span>
				</a>
				<?php 
                    }
                    ?>
		    <?php 
                }
                ?>
	    <?php 
            }
            ?>
			<div class="widget-meta">
				<div class="ribbon"><span class="ribbon-content"></span></div>
				<table>
					<tbody>
						<tr>
							<td class="pw-author"><a href="<?php 
            echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
            ?>
" class="author"><?php 
            echo esc_html(get_the_author());
            ?>
</a></td>
							<?php 
            if ($terms) {
                ?>
<td class="pw-category">
								
							<?php 
                $resultstr = array();
                ?>
				            <?php 
                if ($terms) {
                    foreach ($terms as $term) {
                        ?>
				                <?php 
                        $resultstr[] = '<a title="' . esc_attr($term->name) . '" href="' . esc_url(get_term_link($term->slug, $cat_terms)) . '">' . esc_html($term->name) . '</a>';
                        ?>
				            <?php 
                    }
                    ?>
				            <?php 
                    echo $resultstr[0];
                }
                ?>
								
							</td><?php 
            }
            ?>
							<td class="pw-date"><a href="<?php 
            echo esc_url(get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')));
            ?>
" class="date"><?php 
            the_time('M j, Y');
            ?>
</a></td>
						</tr>
					</tbody>
				</table>
			</div>	
			<div class="content<?php 
            if ($thumbnails) {
                ?>
 no-thumbnail<?php 
            }
            ?>
">
				<?php 
            if ($link) {
                ?>
				<h4 class="title lpd-animated-link"><a href="<?php 
                echo esc_url($link);
                ?>
"><?php 
                the_title();
                ?>
</a></h4>
				<?php 
            } else {
                ?>
				<h4 class="title lpd-animated-link"><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></h4>
				<?php 
            }
            ?>
				<?php 
            if (!$caption) {
                ?>
					<div class="lpd-post-widget-content">
						<p><?php 
                echo lpd_excerpt(15);
                ?>
</p>
					</div>
				<?php 
            }
            ?>
				<div class="lpd-post-widget-element"></div>	
			</div>
		</div>
	<?php 
            if (!$carousel) {
                ?>
</div><?php 
            }
            ?>
	
						<?php 
        }
    }
    wp_reset_query();
    ?>
	
							<?php 
    if ($carousel) {
        ?>
</div><?php 
    }
    ?>
							</div>
						</div>
						
	<?php 
    if ($carousel) {
        $counter_js = new post_widget_class();
        $counter_js->post_widget_callback();
    }
    ?>
						
	<?php 
    return ob_get_clean();
}
function vc_woo_carousel_recent_products_func($atts, $content = null)
{
    extract(shortcode_atts(array('per_page' => '', 'columns' => '', 'orderby' => '', 'order' => '', 'carousel_autoheight' => '', 'carousel_margin' => '', 'carousel_navi' => '', 'carousel_dots_navi' => '', 'carousel_autoplay' => '', 'carousel_autoplaytimeout' => '', 'carousel_autoplayhoverpause' => '', 'carousel_loop' => ''), $atts));
    if (empty($columns)) {
        $columns = '2';
    }
    if (empty($orderby)) {
        $orderby = 'date';
    }
    if (empty($order)) {
        $order = 'DESC';
    }
    global $woocommerce_loop;
    $meta_query = WC()->query->get_meta_query();
    $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $per_page, 'orderby' => $orderby, 'order' => $order, 'meta_query' => $meta_query);
    global $shortcode_atts;
    $shortcode_atts = array('carousel_autoheight' => $carousel_autoheight, 'carousel_margin' => $carousel_margin, 'carousel_navi' => $carousel_navi, 'carousel_dots_navi' => $carousel_dots_navi, 'carousel_autoplay' => $carousel_autoplay, 'carousel_autoplaytimeout' => $carousel_autoplaytimeout, 'carousel_autoplayhoverpause' => $carousel_autoplayhoverpause, 'carousel_loop' => $carousel_loop, 'columns' => $columns);
    lpd_owl_carousel();
    global $carousel_recent_products_ID;
    $carousel_recent_products_ID = rand();
    ob_start();
    ?>
		

		<?php 
    $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $args, $atts));
    $woocommerce_loop['columns'] = $columns;
    if ($products->have_posts()) {
        ?>

			<div class="row">
			<ul class="lpd-products owl-carousel-<?php 
        echo esc_attr($carousel_recent_products_ID);
        ?>
">

				<?php 
        while ($products->have_posts()) {
            $products->the_post();
            ?>

					<?php 
            wc_get_template_part('content', 'product');
            ?>

				<?php 
        }
        // end of the loop.
        ?>

			</ul></div>

		<?php 
    }
    ?>
		
		
		<?php 
    $counter_js = new carousel_recent_products_class();
    $counter_js->carousel_recent_products_callback();
    ?>

		<?php 
    wp_reset_postdata();
    return '<div class="woocommerce columns-' . $columns . '">' . ob_get_clean() . '</div>';
}
function vc_woo_carousel_product_categories_func($atts, $content = null)
{
    extract(shortcode_atts(array('number' => null, 'orderby' => '', 'order' => '', 'columns' => '', 'hide_empty' => '', 'parent' => '', 'carousel_autoheight' => '', 'carousel_margin' => '', 'carousel_navi' => '', 'carousel_dots_navi' => '', 'carousel_autoplay' => '', 'carousel_autoplaytimeout' => '', 'carousel_autoplayhoverpause' => '', 'carousel_loop' => ''), $atts));
    if (empty($columns)) {
        $columns = '2';
    }
    if (empty($orderby)) {
        $orderby = 'date';
    }
    if (empty($order)) {
        $order = 'DESC';
    }
    if (empty($hide_empty)) {
        $hide_empty = '1';
    }
    global $woocommerce_loop;
    if (isset($atts['ids'])) {
        $ids = explode(',', $atts['ids']);
        $ids = array_map('trim', $ids);
    } else {
        $ids = array();
    }
    $hide_empty = $hide_empty == true || $hide_empty == 1 ? 1 : 0;
    // get terms and workaround WP bug with parents/pad counts
    $args = array('orderby' => $orderby, 'order' => $order, 'hide_empty' => $hide_empty, 'include' => $ids, 'pad_counts' => true, 'child_of' => $parent);
    $product_categories = get_terms('product_cat', $args);
    if ($parent !== "") {
        $product_categories = wp_list_filter($product_categories, array('parent' => $parent));
    }
    if ($hide_empty) {
        foreach ($product_categories as $key => $category) {
            if ($category->count == 0) {
                unset($product_categories[$key]);
            }
        }
    }
    if ($number) {
        $product_categories = array_slice($product_categories, 0, $number);
    }
    $woocommerce_loop['columns'] = $columns;
    global $shortcode_atts;
    $shortcode_atts = array('carousel_autoheight' => $carousel_autoheight, 'carousel_margin' => $carousel_margin, 'carousel_navi' => $carousel_navi, 'carousel_dots_navi' => $carousel_dots_navi, 'carousel_autoplay' => $carousel_autoplay, 'carousel_autoplaytimeout' => $carousel_autoplaytimeout, 'carousel_autoplayhoverpause' => $carousel_autoplayhoverpause, 'carousel_loop' => $carousel_loop, 'columns' => $columns);
    lpd_owl_carousel();
    global $carousel_product_categories_ID;
    $carousel_product_categories_ID = rand();
    ob_start();
    ?>
		

		<?php 
    // Reset loop/columns globals when starting a new loop
    $woocommerce_loop['loop'] = $woocommerce_loop['column'] = '';
    if ($product_categories) {
        ?>

			<div class="row"><ul class="lpd-products owl-carousel-<?php 
        echo esc_attr($carousel_product_categories_ID);
        ?>
">

			<?php 
        foreach ($product_categories as $category) {
            wc_get_template('content-product_cat.php', array('category' => $category));
        }
        ?>

			</ul></div>

		<?php 
    }
    $counter_js = new carousel_product_categories_class();
    $counter_js->carousel_product_categories_callback();
    woocommerce_reset_loop();
    return '<div class="woocommerce columns-' . $columns . '">' . ob_get_clean() . '</div>';
}
function vc_woo_carousel_product_category_func($atts, $content = null)
{
    extract(shortcode_atts(array('per_page' => '12', 'columns' => '', 'orderby' => '', 'order' => '', 'category' => '', 'operator' => 'IN', 'carousel_autoheight' => '', 'carousel_margin' => '', 'carousel_navi' => '', 'carousel_dots_navi' => '', 'carousel_autoplay' => '', 'carousel_autoplaytimeout' => '', 'carousel_autoplayhoverpause' => '', 'carousel_loop' => ''), $atts));
    if (empty($columns)) {
        $columns = '2';
    }
    if (empty($orderby)) {
        $orderby = 'date';
    }
    if (empty($order)) {
        $order = 'DESC';
    }
    global $woocommerce_loop;
    if (!$category) {
        return '';
    }
    // Default ordering args
    $ordering_args = WC()->query->get_catalog_ordering_args($orderby, $order);
    $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'orderby' => $ordering_args['orderby'], 'order' => $ordering_args['order'], 'posts_per_page' => $per_page, 'meta_query' => array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN')), 'tax_query' => array(array('taxonomy' => 'product_cat', 'terms' => array(esc_attr($category)), 'field' => 'slug', 'operator' => $operator)));
    if (isset($ordering_args['meta_key'])) {
        $args['meta_key'] = $ordering_args['meta_key'];
    }
    global $shortcode_atts;
    $shortcode_atts = array('carousel_autoheight' => $carousel_autoheight, 'carousel_margin' => $carousel_margin, 'carousel_navi' => $carousel_navi, 'carousel_dots_navi' => $carousel_dots_navi, 'carousel_autoplay' => $carousel_autoplay, 'carousel_autoplaytimeout' => $carousel_autoplaytimeout, 'carousel_autoplayhoverpause' => $carousel_autoplayhoverpause, 'carousel_loop' => $carousel_loop, 'columns' => $columns);
    lpd_owl_carousel();
    global $carousel_product_category_ID;
    $carousel_product_category_ID = rand();
    ob_start();
    ?>
		

		<?php 
    $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $args, $atts));
    $woocommerce_loop['columns'] = $columns;
    if ($products->have_posts()) {
        ?>

			<div class="row">
			<ul class="lpd-products owl-carousel-<?php 
        echo esc_attr($carousel_product_category_ID);
        ?>
">

				<?php 
        while ($products->have_posts()) {
            $products->the_post();
            ?>

					<?php 
            wc_get_template_part('content', 'product');
            ?>

				<?php 
        }
        // end of the loop.
        ?>

			</ul></div>

		<?php 
    }
    ?>
		
		
		<?php 
    $counter_js = new carousel_product_category_class();
    $counter_js->carousel_product_category_callback();
    ?>

		<?php 
    woocommerce_reset_loop();
    wp_reset_postdata();
    return '<div class="woocommerce columns-' . $columns . '">' . ob_get_clean() . '</div>';
}
Example #5
0
function vc_team_widget_func($atts, $content = null)
{
    extract(shortcode_atts(array('carousel' => '', 'carousel_autoheight' => '', 'carousel_margin' => '', 'carousel_navi' => '', 'carousel_dots_navi' => '', 'carousel_autoplay' => '', 'carousel_autoplaytimeout' => '', 'carousel_autoplayhoverpause' => '', 'carousel_loop' => '', 'columns' => '', 'image_size' => '', 'items' => '', 'cat_filter' => '', 'order' => '', 'orderby' => '', 'vc_progress_bar' => '', 'social_media' => ''), $atts));
    if (empty($image_size)) {
        $image_size = 'theme-size-2x3';
    }
    if (empty($columns)) {
        $columns = '3';
    }
    if (empty($orderby)) {
        $orderby = 'date';
    }
    if (empty($order)) {
        $order = 'DESC';
    }
    if ($items) {
        $posts_per_page = '&posts_per_page=' . $items . '';
    } else {
        $posts_per_page = '&posts_per_page=-1';
    }
    if ($carousel) {
        if ($columns == "3") {
            $columns = "4";
        } elseif ($columns == "4") {
            $columns = "3";
        } elseif ($columns == "6") {
            $columns = "2";
        }
        global $shortcode_atts;
        $shortcode_atts = array('carousel_autoheight' => $carousel_autoheight, 'carousel_margin' => $carousel_margin, 'carousel_navi' => $carousel_navi, 'carousel_dots_navi' => $carousel_dots_navi, 'carousel_autoplay' => $carousel_autoplay, 'carousel_autoplaytimeout' => $carousel_autoplaytimeout, 'carousel_autoplayhoverpause' => $carousel_autoplayhoverpause, 'carousel_loop' => $carousel_loop, 'columns' => $columns);
        lpd_owl_carousel();
        global $the_team_widget_ID;
        $the_team_widget_ID = rand();
    }
    if ($cat_filter) {
        $cat_filter = '&team_category=' . $cat_filter;
    }
    ob_start();
    ?>
   
   <div class="lpd_team_widget">
   <div class="row">
   
   <?php 
    if ($carousel) {
        ?>
<div class="col-md-12 owl-carousel-<?php 
        echo esc_attr($the_team_widget_ID);
        ?>
"><?php 
    }
    ?>
	   
		<?php 
    $query = new WP_Query();
    ?>
		<?php 
    $query->query('post_type=team' . $posts_per_page . '' . $cat_filter . '&orderby=' . $orderby . '&order=' . $order . '');
    ?>
			
        <?php 
    if ($query->have_posts()) {
        while ($query->have_posts()) {
            $query->the_post();
            ?>
		
		<?php 
            $position = get_post_meta(get_the_ID(), 'team_options_text', true);
            ?>
		<?php 
            $facebook = get_post_meta(get_the_ID(), 'team_options_facebook', true);
            ?>
		<?php 
            $twitter = get_post_meta(get_the_ID(), 'team_options_twitter', true);
            ?>
		<?php 
            $linkedin = get_post_meta(get_the_ID(), 'team_options_linkedin', true);
            ?>
		<?php 
            $pinterest = get_post_meta(get_the_ID(), 'team_options_pinterest', true);
            ?>
		<?php 
            $google_plus = get_post_meta(get_the_ID(), 'team_options_google_plus', true);
            ?>
		<?php 
            $tumblr = get_post_meta(get_the_ID(), 'team_options_tumblr', true);
            ?>
		<?php 
            $instagram = get_post_meta(get_the_ID(), 'team_options_instagram', true);
            ?>
		<?php 
            $custom1_icon = get_post_meta(get_the_ID(), 'team_options_custom1_icon', true);
            ?>
		<?php 
            $custom1_title = get_post_meta(get_the_ID(), 'team_options_custom1_title', true);
            ?>
		<?php 
            $custom1_url = get_post_meta(get_the_ID(), 'team_options_custom1_url', true);
            ?>
		<?php 
            $custom2_icon = get_post_meta(get_the_ID(), 'team_options_custom2_icon', true);
            ?>
		<?php 
            $custom2_title = get_post_meta(get_the_ID(), 'team_options_custom2_title', true);
            ?>
		<?php 
            $custom2_url = get_post_meta(get_the_ID(), 'team_options_custom2_url', true);
            ?>
		<?php 
            $progress_bar = get_post_meta(get_the_ID(), 'team_options_repeatable', true);
            ?>
		<?php 
            if ($progress_bar) {
                $progress_bar = array_filter($progress_bar);
            }
            ?>
					
		
		<?php 
            if (!$carousel) {
                ?>
<div class="col-md-<?php 
                echo esc_attr($columns);
                ?>
"><?php 
            }
            ?>
			<div class="team-widget-item">
				
		        <?php 
            if (has_post_thumbnail()) {
                ?>
					<a href="<?php 
                the_permalink();
                ?>
" class="team-widget-thumbnail">
						<img alt="<?php 
                the_title();
                ?>
" class="img-responsive" src="<?php 
                $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), $image_size);
                echo esc_url($image[0]);
                ?>
"/>
					</a>
				<?php 
            } else {
                ?>
			        <a href="<?php 
                the_permalink();
                ?>
">
			        	<img class="img-responsive" alt="<?php 
                the_title();
                ?>
" src="<?php 
                echo THEME_ASSETS;
                ?>
img/no-image.png"/>
					</a>
		        <?php 
            }
            ?>
		        
		       <div class="team-widget-content">
					
					<div class="tw-title">
						<div class="ribbon tw-ribbon">
							<span class="ribbon-content">
								<span class="content-ribbon"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></span>
							</span>
						</div>
					</div>
					<?php 
            if ($position) {
                ?>
                    	<div class="member-position"><span><?php 
                echo esc_html($position);
                ?>
</span></div>
                    <?php 
            }
            ?>
					<div class="tw_content">
						<p><?php 
            echo lpd_excerpt(15);
            ?>
</p>
						
						<?php 
            if ($vc_progress_bar) {
                ?>
						<?php 
                $separator = "|";
                $output = '';
                foreach ($progress_bar as $item) {
                    if ($item) {
                        list($item_text1, $item_text2) = explode($separator, trim($item));
                        $output .= '<div class="lpd-progress-bar">';
                        $output .= '	<span class="progress-title">' . esc_html($item_text2) . ' ' . esc_html($item_text1) . '%</span>';
                        $output .= '	<div class="progress">';
                        $output .= '	  <div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="' . esc_attr($item_text1) . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . esc_attr($item_text1) . '%;">';
                        $output .= '	    <span class="sr-only">' . esc_html($item_text1) . '% ' . esc_html($item_text2) . '</span>';
                        $output .= '	  </div>';
                        $output .= '	</div>';
                        $output .= '</div>';
                    }
                }
                echo $output;
                ?>
				        <?php 
            }
            ?>
						
					</div>
					
					<?php 
            if ($social_media) {
                ?>
		                        
						<?php 
                if ($facebook || $twitter || $linkedin || $pinterest || $google_plus || $tumblr || $instagram || $custom1_icon || $custom2_icon) {
                    ?>
						<div class="team-widget-social-details picons_social lpd-animated-link">
							<ul>
								<?php 
                    if ($facebook) {
                        ?>
<li><a href="<?php 
                        echo esc_url($facebook);
                        ?>
" class="icon facebook1"></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($twitter) {
                        ?>
<li><a href="<?php 
                        echo esc_url($twitter);
                        ?>
" class="icon twitter1"></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($linkedin) {
                        ?>
<li><a href="<?php 
                        echo esc_url($linkedin);
                        ?>
" class="icon linkedin1"></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($pinterest) {
                        ?>
<li><a href="<?php 
                        echo esc_url($pinterest);
                        ?>
" class="icon pinterest1"></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($google_plus) {
                        ?>
<li><a href="<?php 
                        echo esc_url($google_plus);
                        ?>
" class="icon google_plus1"></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($tumblr) {
                        ?>
<li><a href="<?php 
                        echo esc_url($tumblr);
                        ?>
" class="icon tumblr1"></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($instagram) {
                        ?>
<li><a href="<?php 
                        echo esc_url($instagram);
                        ?>
" class="icon instagram1"></a></li><?php 
                    }
                    ?>
								
								<?php 
                    if ($custom1_icon && $custom1_url) {
                        ?>
<li><a href="<?php 
                        echo esc_url($custom1_url);
                        ?>
" class="icon custom-icon"<?php 
                        if ($custom1_icon) {
                            ?>
 style="background-image:url(<?php 
                            $custom1_icon_image = wp_get_attachment_image_src($custom1_icon, 'full');
                            echo $custom1_icon_image[0];
                            ?>
);"<?php 
                        }
                        ?>
></a></li><?php 
                    }
                    ?>
								<?php 
                    if ($custom2_icon && $custom2_url) {
                        ?>
<li><a href="<?php 
                        echo esc_url($custom2_url);
                        ?>
" class="icon custom-icon"<?php 
                        if ($custom2_icon) {
                            ?>
 style="background-image:url(<?php 
                            $custom2_icon_image = wp_get_attachment_image_src($custom2_icon, 'full');
                            echo $custom2_icon_image[0];
                            ?>
);"<?php 
                        }
                        ?>
></a></li><?php 
                    }
                    ?>
							</ul>
						</div>
						<?php 
                }
                ?>
					<?php 
            }
            ?>
					
		        
		       </div>				       

			</div>
		<?php 
            if (!$carousel) {
                ?>
</div><?php 
            }
            ?>
		
		<?php 
        }
    }
    wp_reset_query();
    ?>
		
	<?php 
    if ($carousel) {
        ?>
</div><?php 
    }
    ?>
	   
	</div>
	</div>
	
	<?php 
    if ($carousel) {
        $counter_js = new team_widget_class();
        $counter_js->team_widget_callback();
    }
    ?>
   
   <?php 
    return ob_get_clean();
}