Exemple #1
0
/**
 * Add featured label and label before blog
 */
function photolab_blog_labels()
{
    global $photolab_first_sticky, $photolab_first_post, $wp_query;
    if (is_sticky() && $photolab_first_sticky) {
        return;
    } elseif (!is_sticky() && $photolab_first_post) {
        return;
    } elseif (is_sticky()) {
        $photolab_first_sticky = get_the_id();
        $label = photolab_get_option('featured_label');
        if ($wp_query->is_home() && $wp_query->is_main_query()) {
            if ($wp_query->is_paged && $wp_query->query['paged'] > 1) {
                return;
            }
            if ($label) {
                echo '<div class="col-md-12"><h3 class="blog_label"><span>' . $label . '</span></h3></div>';
            }
        }
    } else {
        $photolab_first_post = get_the_id();
        $label = photolab_get_option('blog_label');
        if ($wp_query->is_home() && $wp_query->is_main_query()) {
            if ($wp_query->is_paged && $wp_query->query['paged'] > 1) {
                return;
            }
            if ($label) {
                echo '<div class="col-md-12"><h3 class="blog_label"><span>' . $label . '</span></h3></div>';
            }
        }
    }
}
Exemple #2
0
					</div><!-- .entry-meta -->
				<?php 
}
?>
				<?php 
the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>');
?>
			</header><!-- .entry-header -->

			<?php 
photolab_image_post();
?>

			<div class="entry-content">
				<?php 
$photolab_blog_content = photolab_get_option('blog_content', 'excerpt');
if ('excerpt' == $photolab_blog_content) {
    photolab_excerpt();
} else {
    the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'photolab'));
    wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'photolab'), 'after' => '</div>'));
}
?>
			</div><!-- .entry-content -->
			<?php 
photolab_read_more();
?>

		</div><!-- .entry-wrapper -->
		<div class="clear"></div>
	</div><!-- .entry-content-wrapper -->
Exemple #3
0
/**
 * photolab readmore btn
 */
function photolab_read_more()
{
    $btn_text = photolab_get_option('blog_btn', __("Read More", "photolab"));
    if (!$btn_text) {
        return;
    }
    echo '<a href="' . esc_url(get_permalink()) . '" class="btn btn-animated">' . esc_attr($btn_text) . '</a>';
}