Example #1
0
			
		</div><!--end article-media-->

	<?php 
}
?>


	<div class="article-content">
	<?php 
if (!is_single()) {
    // Only display Excerpts for Search
    ?>

			<?php 
    echo kleo_excerpt(50);
    ?>
			<?php 
    if (get_the_excerpt()) {
        ?>
					<p><a class="btn btn-default" href="<?php 
        the_permalink();
        ?>
"><?php 
        _e("Continue reading", 'kleo_framework');
        ?>
</a></p>
			<?php 
    }
    ?>
Example #2
0
    /**
     * Display widget
     */
    function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        $title = apply_filters('widget_title', $instance['title']);
        $limit = $instance['limit'];
        $length = (int) $instance['length'];
        $thumb = isset($instance['thumb']) ? $instance['thumb'] : '';
        $excerpt = isset($instance['excerpt']) ? $instance['excerpt'] : '';
        $cat = $instance['cat'];
        $post_type = $instance['post_type'];
        global $post;
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        $args = array('numberposts' => $limit, 'cat' => $cat, 'post_type' => $post_type);
        $kleo_recent_posts = get_posts($args);
        ?>

		<div>
			
			<ul class='news-widget-wrap'>

				<?php 
        foreach ($kleo_recent_posts as $post) {
            setup_postdata($post);
            ?>
					<li class="news-content">
						<a class="news-link" href="<?php 
            the_permalink();
            ?>
">
							<?php 
            if ($thumb == 1) {
                /* Display author image */
                ?>

								<span class="news-thumb"><?php 
                echo get_avatar(get_the_author_meta('ID'), 40);
                ?>
</span>
								<span class="news-headline"><?php 
                the_title();
                ?>
<small class="news-time"><?php 
                echo get_the_date();
                ?>
</small></span>

                                <?php 
                if ($excerpt == 1) {
                    ?>
                                    <span class="news-excerpt"><?php 
                    echo kleo_excerpt($length, false);
                    ?>
</span>
                                <?php 
                }
                ?>

                            <?php 
            } elseif ($thumb == 2) {
                /* Display post thumbnail */
                ?>
                                <?php 
                $img_url = kleo_get_post_thumbnail_url();
                if ($img_url != '') {
                    $image = aq_resize($img_url, 44, 44, true, true, true);
                    if (!$image) {
                        $image = $img_url;
                    }
                    $html_img = '<img src="' . $image . '" alt="" title="">';
                } else {
                    $html_img = '';
                }
                ?>
                                <span class="news-thumb"><?php 
                echo $html_img;
                ?>
</span>
                                <span class="news-headline"><?php 
                the_title();
                ?>
<small class="news-time"><?php 
                echo get_the_date();
                ?>
</small></span>

                                <?php 
                if ($excerpt == 1) {
                    ?>
                                    <span class="news-excerpt"><?php 
                    echo kleo_excerpt($length, false);
                    ?>
</span>
                                <?php 
                }
                ?>

                            <?php 
            } else {
                ?>

								<span><?php 
                the_title();
                ?>
<small class="news-time"><?php 
                echo get_the_date();
                ?>
</small></span>

                                <?php 
                if ($excerpt == 1) {
                    ?>
                                    <span class="news-excerpt"><?php 
                    echo kleo_excerpt($length, false);
                    ?>
</span>
                                <?php 
                }
                ?>

							<?php 
            }
            ?>
							
						</a>
		
					</li>
				<?php 
        }
        wp_reset_postdata();
        ?>

			</ul>

		</div>

		<?php 
        echo $after_widget;
    }
Example #3
0
</a></h3>

                            <div class="article-meta">
                                <span class="post-meta">
                                    <?php 
                kleo_entry_meta();
                ?>
                                </span>
                            </div>

                            <div class="entry-summary">
                                <?php 
                if (!in_array($kleo_post_format, array('status', 'quote', 'link'))) {
                    ?>
                                    <?php 
                    echo kleo_excerpt();
                    ?>
                                <?php 
                } else {
                    ?>
                                    <?php 
                    the_content();
                    ?>
                                <?php 
                }
                ?>
                            </div><!-- .entry-summary -->

                        </div>
                    </article>
Example #4
0
?>


            <div class="portfolio-header">
                <h3 class="post-title"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h3>
            </div><!--end portfolio-header-->

            <?php 
if (kleo_excerpt() != '<p></p>') {
    ?>

                <div class="portfolio-info">
                    <?php 
    echo kleo_excerpt(60, false);
    ?>
                </div><!--end post-info-->

            <?php 
}
?>

        </div><!--end post-content-->
	</li>