case 'center':
        default:
            ts_the_resized_post_thumbnail_sidebar(array('full', 'one-sidebar', 'two-sidebars'), get_the_title());
            break;
    }
    ?>
					</div>
				</div>
				<div class='blue-line'></div>
			</article>
		<?php 
}
?>
		<div class='post-body-text'>
			<p><?php 
ts_the_excerpt_theme('regular');
?>
</p>
		</div>
		<a href='<?php 
the_permalink();
?>
' title="<?php 
esc_attr_e(get_the_title());
?>
" class='sc-button grey-grad'><?php 
_e('read more', 'circles');
?>
</a>
	</div>
</article>
Example #2
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;
}
    function widget($args, $instance)
    {
        global $post;
        $cache = wp_cache_get('widget_latest_posts_entries', 'widget');
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!isset($args['widget_id'])) {
            $args['widget_id'] = $this->id;
        }
        if (isset($cache[$args['widget_id']])) {
            echo $cache[$args['widget_id']];
            return;
        }
        ob_start();
        extract($args);
        echo $before_widget;
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Popular Posts', "framework") : $instance['title'], $instance, $this->id_base);
        if (empty($instance['number']) || !($number = absint($instance['number']))) {
            $number = 10;
        }
        $r = new WP_Query(apply_filters('widget_posts_args', array('orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true)));
        if ($r->have_posts()) {
            ?>
			<?php 
            echo $before_title . $title . $after_title;
            ?>
			<?php 
            $posts_sz = count($r->posts);
            ?>
			<?php 
            $i = 1;
            ?>
			<ul class="latest-posts">
				<?php 
            while ($r->have_posts()) {
                $r->the_post();
                ?>
				<li>
					<div class="latest-desc">
						<div class="latest-meta">
							<div class="latest-date"><?php 
                the_time(get_option('date_format'));
                ?>
</div>
							<div class="latest-author"><?php 
                _e('By', 'circles');
                ?>
 <?php 
                the_author_link();
                ?>
</div>
						</div>
						<h3><a title="<?php 
                echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
                ?>
" href="<?php 
                the_permalink();
                ?>
"><?php 
                if (get_the_title()) {
                    echo ts_get_shortened_string(get_the_title(), 6);
                } else {
                    the_ID();
                }
                ?>
</a></h3>
						<div class="latest-excerpts"><?php 
                ts_the_excerpt_theme('tiny');
                ?>
</div>
					</div>
					<div class="clear"></div>
				</li>
				<?php 
                $i++;
                ?>
				<?php 
            }
            ?>
			</ul>
			<?php 
            // Reset the global $the_post as this query will have stomped on it
            wp_reset_postdata();
        }
        //have_posts()
        echo $after_widget;
        $cache[$args['widget_id']] = ob_get_flush();
        wp_cache_set('widget_latest_posts_entries', $cache, 'widget');
    }
<?php

/** 
 * Meta part for blog classic
 * 
 * @package Rhythm
 */
?>
<!-- Text Intro -->
<div class="post-prev-text">
	<?php 
ts_the_excerpt_theme(20);
?>
</div>
            ?>
											</span>
										</div>
									<?php 
        }
        ?>
								</footer>
								<div class="column_post-body">

									<?php 
        $length = 'regular';
        $page_length = get_post_meta(ts_get_current_id(), 'excerpt_length', true);
        if (!empty($page_length)) {
            $length = $page_length;
        }
        ts_the_excerpt_theme($length);
        ?>

								</div>
							</div>
						</article>
					<?php 
    }
    ?>
				<?php 
}
?>
				<?php 
wp_reset_postdata();
?>
			</div>
    function widget($args, $instance)
    {
        global $comment;
        $cache = wp_cache_get('widget_multi_posts_entries', 'widget');
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!isset($args['widget_id'])) {
            $args['widget_id'] = $this->id;
        }
        if (isset($cache[$args['widget_id']])) {
            echo $cache[$args['widget_id']];
            return;
        }
        ob_start();
        extract($args);
        echo $before_widget;
        $rand = rand(15000, 50000);
        ?>
		<div id='tab-<?php 
        echo $rand;
        ?>
' class="multi-post underline">
			<ul>
				<li><a><?php 
        _e('Popular', 'framework');
        ?>
</a></li>
				<li><a><?php 
        _e('Recent', 'framework');
        ?>
</a></li>
				<li><a><?php 
        _e('Comments', 'framework');
        ?>
</a></li>
			</ul>
			<div>
				<div class='widget_bookmark_content'>
					<?php 
        $number = 3;
        $r = new WP_Query(apply_filters('widget_posts_args', array('orderby' => 'comment_count DESC', 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true)));
        if ($r->have_posts()) {
            ?>
						<?php 
            $posts_sz = count($r->posts);
            ?>
						<?php 
            $i = 0;
            ?>
							<?php 
            while ($r->have_posts()) {
                $r->the_post();
                ?>
								<div class='widget_bookmark_content_item'>
									<span class="widget_bookmark_date"><?php 
                the_time(get_option('date_format'));
                ?>
</span> <span class="widget_bookmark_separator">|</span>
									<span class="widget_bookmark_author">
										<?php 
                _e('By', 'circles');
                ?>
										<span>
											<?php 
                the_author_posts_link();
                ?>
										</span>
									</span>
									<a title="<?php 
                echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
                ?>
" href="<?php 
                the_permalink();
                ?>
"><?php 
                if (get_the_title()) {
                    echo ts_get_shortened_string(get_the_title(), 5);
                } else {
                    the_ID();
                }
                ?>
</a>
									<?php 
                ts_the_excerpt_theme(8);
                ?>
								</div>
								<?php 
                if ($i < 2) {
                    ?>
									<div class='g-line'></div>
								<?php 
                }
                ?>
								<?php 
                $i++;
                ?>
							<?php 
            }
            ?>
						<?php 
            // Reset the global $the_post as this query will have stomped on it
            wp_reset_postdata();
        }
        //have_posts()
        ?>
				</div>

				<div class='widget_bookmark_content'>
					<?php 
        $number = 3;
        $r = new WP_Query(apply_filters('widget_posts_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true)));
        if ($r->have_posts()) {
            ?>
						<?php 
            $posts_sz = count($r->posts);
            ?>
						<?php 
            $i = 0;
            ?>
							<?php 
            while ($r->have_posts()) {
                $r->the_post();
                ?>
								<div class='widget_bookmark_content_item'>
									<span class="widget_bookmark_date"><?php 
                the_time(get_option('date_format'));
                ?>
</span> <span class="widget_bookmark_separator">|</span>
									<span class="widget_bookmark_author">
										<?php 
                _e('By', 'circles');
                ?>
										<span>
											<?php 
                the_author_posts_link();
                ?>
										</span>
									</span>
									<a title="<?php 
                echo esc_attr(get_the_title() ? get_the_title() : get_the_ID());
                ?>
" href="<?php 
                the_permalink();
                ?>
"><?php 
                if (get_the_title()) {
                    echo ts_get_shortened_string(get_the_title(), 5);
                } else {
                    the_ID();
                }
                ?>
</a>
									<?php 
                ts_the_excerpt_theme(8);
                ?>
								</div>
								<?php 
                if ($i < 2) {
                    ?>
									<div class='g-line'></div>
								<?php 
                }
                ?>
								<?php 
                $i++;
                ?>
							<?php 
            }
            ?>
						<?php 
            // Reset the global $the_post as this query will have stomped on it
            wp_reset_postdata();
        }
        //have_posts()
        ?>
				</div>
				<div class='widget_bookmark_content'>
					<?php 
        $number = 3;
        $comments = get_comments(apply_filters('widget_comments_args', array('number' => $number, 'status' => 'approve', 'post_status' => 'publish')));
        $i = 0;
        if ($comments) {
            foreach ((array) $comments as $comment) {
                ?>
							<div class='widget_bookmark_content_item'>
								<span class="widget_bookmark_date"><?php 
                echo comment_time(get_option('date_format'), $comment->comment_ID);
                ?>
</span>
								<a href='<?php 
                echo esc_url(get_comment_link($comment->comment_ID));
                ?>
'><?php 
                echo ts_get_shortened_string($comment->comment_content, 5);
                ?>
</a>
							</div>
							<?php 
                if ($i < 2) {
                    ?>
								<div class='g-line'></div>
							<?php 
                }
                ?>
							<?php 
                $i++;
                ?>
							<?php 
            }
        }
        ?>
				</div>
			</div>
		</div>
		<script>
			jQuery(document).ready(function(){
				jQuery('#tab-<?php 
        echo $rand;
        ?>
').zozoTabs({
					theme: 'silver'
				});
			});
		</script>
		<?php 
        echo $after_widget;
        $cache[$args['widget_id']] = ob_get_flush();
        wp_cache_set('widget_multi_posts_entries', $cache, 'widget');
    }
Example #7
0
) no-repeat center;
				background-size: <?php 
    if (get_post_meta($post->ID, 'scale')[0] == '') {
        print "cover";
    } else {
        print get_post_meta($post->ID, 'scale')[0];
    }
    ?>
">
			</div>
		<?php 
}
?>
		<div class='post-body-text'>
			<p><?php 
ts_the_excerpt_theme('long');
?>
</p>
		</div>
		<a href='<?php 
the_permalink();
?>
' title="<?php 
esc_attr_e(get_the_title());
?>
" class='sc-button grey-grad'><?php 
_e('read more', 'circles');
?>
</a>
	</div>
</article>