Example #1
0
>
							<a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title();
    ?>
" rel="nofollow" id="featured-thumbnail">
		    				    <?php 
    echo '<div class="featured-thumbnail">';
    if (has_post_thumbnail()) {
        the_post_thumbnail('sociallyviral_related', array('title' => ''));
    } else {
        ?>
											<img src="<?php 
        echo sociallyviral_get_thumbnail_url('sociallyviral_related');
        ?>
" alt="<?php 
        the_title();
        ?>
" />
									<?php 
    }
    echo '</div>';
    ?>
		    				</a>
							<header class="entry-header">
								<?php 
    the_title(sprintf('<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h1>');
    ?>
							</header><!-- .entry-header -->
Example #2
0
>
					<a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
" rel="nofollow" id="featured-thumbnail">
    				    <?php 
        echo '<div class="featured-thumbnail">';
        if (has_post_thumbnail()) {
            the_post_thumbnail($image_size, array('title' => ''));
        } else {
            ?>
							<img src="<?php 
            echo sociallyviral_get_thumbnail_url($image_size == 'sociallyviral_featuredbig' ? 'sociallyviral_featuredbig' : 'sociallyviral_featured');
            ?>
" alt="<?php 
            the_title();
            ?>
" />
						<?php 
        }
        echo '</div>';
        ?>
    				    <?php 
        if ($image_size == 'sociallyviral_featuredbig') {
            ?>
							<div class="post-label"><i class="icon-star"></i><span><?php 
            _e('Featured', 'sociallyviral');
            ?>
    public function get_cat_posts($qty, $title_length, $comment_num, $date, $show_thumb2, $box_layout, $show_excerpt, $excerpt_length)
    {
        $no_image = $show_thumb2 ? '' : ' no-thumb';
        if ('horizontal-small' === $box_layout) {
            $thumbnail = 'sociallyviral_widgetthumb';
            $open_li_item = '<li class="post-box horizontal-small horizontal-container' . $no_image . '"><div class="horizontal-container-inner">';
            $close_li_item = '</div></li>';
        } else {
            $thumbnail = 'sociallyviral_widgetfull';
            $open_li_item = '<li class="post-box vertical-small' . $no_image . '">';
            $close_li_item = '</li>';
        }
        $posts = new WP_Query("orderby=date&order=DESC&posts_per_page=" . $qty);
        echo '<ul class="advanced-recent-posts">';
        while ($posts->have_posts()) {
            $posts->the_post();
            ?>
			<?php 
            echo $open_li_item;
            ?>
				<?php 
            if ($show_thumb2 == 1) {
                ?>
				<div class="post-img">
					<a rel="nofollow" href="<?php 
                echo esc_url(get_the_permalink());
                ?>
" title="<?php 
                echo esc_attr(get_the_title());
                ?>
">
						<?php 
                echo '<div class="featured-thumbnail">';
                if (has_post_thumbnail()) {
                    the_post_thumbnail($thumbnail, array('title' => ''));
                } else {
                    ?>
							<img src="<?php 
                    echo sociallyviral_get_thumbnail_url($thumbnail == 'sociallyviral_widgetthumb' ? 'sociallyviral_widgetthumb' : 'sociallyviral_widgetfull');
                    ?>
" alt="<?php 
                    the_title();
                    ?>
" />
						<?php 
                }
                echo '</div>';
                ?>
					</a>
				</div>
				<?php 
            }
            ?>
				<div class="post-data">
					<div class="post-data-container">
						<div class="post-title">
							<a href="<?php 
            echo esc_url(get_the_permalink());
            ?>
" title="<?php 
            echo esc_attr(get_the_title());
            ?>
"><?php 
            echo esc_html(sociallyviral_truncate(get_the_title(), $title_length, 'words'));
            ?>
</a>
						</div>
						<?php 
            if ($date == 1 || $comment_num == 1) {
                ?>
						<div class="post-info">
							<?php 
                if ($date == 1) {
                    ?>
							<span class="thetime updated"><i class="icon-clock"></i> <?php 
                    the_time(get_option('date_format'));
                    ?>
</span>
							<?php 
                }
                ?>
							<?php 
                if ($comment_num == 1) {
                    ?>
							<span class="thecomment"><i class="icon-chat"></i> <?php 
                    echo comments_number('0', '1', '%');
                    ?>
</span>
							<?php 
                }
                ?>
						</div> <!--.post-info-->
						<?php 
            }
            ?>
						<?php 
            if ($show_excerpt == 1) {
                ?>
						<div class="post-excerpt">
							<?php 
                echo sociallyviral_excerpt($excerpt_length);
                ?>
						</div>
						<?php 
            }
            ?>
					</div>
				</div>
			<?php 
            echo $close_li_item;
            ?>
		<?php 
        }
        wp_reset_postdata();
        echo '</ul>' . "\r\n";
    }
Example #4
0
>
					<a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
" rel="nofollow" id="featured-thumbnail">
    				    <?php 
        echo '<div class="featured-thumbnail">';
        if (has_post_thumbnail()) {
            the_post_thumbnail('sociallyviral_featured', array('title' => ''));
        } else {
            ?>
								<img src="<?php 
            echo sociallyviral_get_thumbnail_url('sociallyviral_featured');
            ?>
" alt="<?php 
            the_title();
            ?>
" />
						<?php 
        }
        echo '</div>';
        ?>
    				</a>
					<header class="entry-header">
						<?php 
        the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>');
        ?>
						<div class="entry-meta post-info">