1st commit
This commit is contained in:
63
formats/blog-classic/gallery.php
Normal file
63
formats/blog-classic/gallery.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<!-- start blog item -->
|
||||
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">
|
||||
|
||||
<!-- start content -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
<div class="post-content">
|
||||
<div class="blog-date">
|
||||
<span class="span-day"><?php echo get_the_time('d');?></span>
|
||||
<span class="span-month"><?php echo get_the_time('M');?></span>
|
||||
</div>
|
||||
<?php if (function_exists('printLikes')) { ?>
|
||||
<div class="kk-likes">
|
||||
<?php printLikes(get_the_ID()); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-content">
|
||||
|
||||
<!-- start slider -->
|
||||
<div class="slider-wrapper">
|
||||
|
||||
<div id="kk_post_slider_<?php the_ID(); ?>" class="royalSlider rsDefault kk-slider-ef">
|
||||
<?php
|
||||
$attachments = rwmb_meta( 'kk_imgpost', 'type=image_advanced' );
|
||||
foreach ($attachments as $attachment) {
|
||||
|
||||
if (get_option('toppic_theme_blog_sidebar') !== 'full') {
|
||||
$image_size = 'medium_large';
|
||||
} else {
|
||||
$image_size = 'large';
|
||||
};
|
||||
|
||||
echo wp_get_attachment_image( $attachment['ID'], $image_size, '', array( 'class' => 'rsImg', 'title' => $attachment['title'], 'alt' => $attachment['caption'], 'data-lazy-load' => 0 ) );
|
||||
|
||||
?>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end slider -->
|
||||
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
|
||||
<h2 class="blog-title">
|
||||
<a href="<?php the_permalink() ?>"><?php the_title() ?></a>
|
||||
</h2>
|
||||
|
||||
<!--start meta -->
|
||||
<?php get_template_part( 'formats/blog-classic/post-meta' ); ?>
|
||||
<!--end meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<!-- end blog item -->
|
||||
58
formats/blog-classic/image.php
Normal file
58
formats/blog-classic/image.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<!-- start blog item -->
|
||||
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">
|
||||
|
||||
<!-- start content -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
<div class="post-content">
|
||||
<div class="blog-date">
|
||||
<span class="span-day"><?php echo get_the_time('d');?></span>
|
||||
<span class="span-month"><?php echo get_the_time('M');?></span>
|
||||
</div>
|
||||
<?php if (function_exists('printLikes')) { ?>
|
||||
<div class="kk-likes">
|
||||
<?php printLikes(get_the_ID()); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-content">
|
||||
|
||||
<!--start image -->
|
||||
<?php if(has_post_thumbnail()):
|
||||
|
||||
if (get_option('toppic_theme_blog_sidebar') !== 'full') {
|
||||
$image_size = 'medium_large';
|
||||
} else {
|
||||
$image_size = 'large';
|
||||
};
|
||||
|
||||
?>
|
||||
|
||||
<div class="blog-thumb effect-zoom">
|
||||
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
|
||||
<?php the_post_thumbnail( $image_size ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<!--end image -->
|
||||
|
||||
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
|
||||
<h2 class="blog-title">
|
||||
<a href="<?php the_permalink() ?>"><?php the_title() ?></a>
|
||||
</h2>
|
||||
<!--start meta -->
|
||||
<?php get_template_part( 'formats/blog-classic/post-meta' ); ?>
|
||||
<!--end meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<!-- end blog item -->
|
||||
67
formats/blog-classic/link.php
Normal file
67
formats/blog-classic/link.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<!-- start blog item -->
|
||||
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">
|
||||
|
||||
<!-- start content -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
<div class="post-content">
|
||||
<div class="blog-date">
|
||||
<span class="span-day"><?php echo get_the_time('d');?></span>
|
||||
<span class="span-month"><?php echo get_the_time('M');?></span>
|
||||
</div>
|
||||
<?php if (function_exists('printLikes')) { ?>
|
||||
<div class="kk-likes">
|
||||
<?php printLikes(get_the_ID()); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-content">
|
||||
<?php
|
||||
$url = get_post_meta($post->ID, '_post_link_value', true);
|
||||
if(empty($url)) $url= "#";
|
||||
?>
|
||||
<!--start image -->
|
||||
<?php if(has_post_thumbnail()): ?>
|
||||
<div class="blog-thumb effect-zoom">
|
||||
|
||||
<?php
|
||||
$image_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'featured-image-thumb' );
|
||||
|
||||
if (get_option('toppic_theme_blog_sidebar') !== 'full') {
|
||||
$image_size = 'medium_large';
|
||||
} else {
|
||||
$image_size = 'large';
|
||||
}; ?>
|
||||
|
||||
<a href="<?php echo esc_url($url) ?>" target="_blank">
|
||||
<?php echo get_the_post_thumbnail( get_the_id(), $image_size, array( 'data-lazy-load' => 0 ) ); ?>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<!--end image -->
|
||||
|
||||
<h2 class="blog-title">
|
||||
|
||||
— <?php _e('Link:','toppic');?>
|
||||
<a href="<?php echo esc_url($url) ?>" target="_blank"><?php the_title() ?></a>
|
||||
</h2>
|
||||
|
||||
<!--start meta -->
|
||||
<?php get_template_part( 'formats/blog-classic/post-meta' ); ?>
|
||||
<!--end meta -->
|
||||
|
||||
<div class="blog-entry">
|
||||
|
||||
<?php if (is_single()): ?>
|
||||
<h3>— <?php _e('Link:','toppic');?> <a href="<?php echo esc_url($url) ?>" target="_blank"><?php the_title() ?></a></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<!-- end blog item -->
|
||||
9
formats/blog-classic/post-meta.php
Normal file
9
formats/blog-classic/post-meta.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="blog-meta">
|
||||
<span><i class="kk kk-icon-pencil"></i><?php the_author(); ?></span>
|
||||
/
|
||||
<span><i class="kk kk-icon-folder-open-empty"></i><?php the_category(', '); ?></span>
|
||||
/
|
||||
<span><i class="kk kk-icon-clock"></i><time datetime="<?php the_modified_date( 'c' ) ?>"><?php the_time( get_option( 'date_format' ) ); ?></time></span>
|
||||
/
|
||||
<span><a title="<?php printf(__('View comments to %s', 'toppic'), get_the_title()); ?>" href="<?php comments_link(); ?> "><i class="kk kk-icon-comment-empty"></i><?php comments_number(__('0 Comments', 'toppic'), __('1 Comment', 'toppic'), __('% Comments', 'toppic'))?></a></span>
|
||||
</div>
|
||||
39
formats/blog-classic/quote.php
Normal file
39
formats/blog-classic/quote.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<!-- start blog item -->
|
||||
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">
|
||||
|
||||
<!-- start content -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
<div class="post-content">
|
||||
<div class="blog-date">
|
||||
<span class="span-day"><?php echo get_the_time('d');?></span>
|
||||
<span class="span-month"><?php echo get_the_time('M');?></span>
|
||||
</div>
|
||||
<?php if (function_exists('printLikes')) { ?>
|
||||
<div class="kk-likes">
|
||||
<?php printLikes(get_the_ID()); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-content">
|
||||
<?php $quoteLink = get_post_meta($post->ID, '_post_quote_source_value', true); ?>
|
||||
|
||||
<h2 class="quote-text">
|
||||
“<?php echo esc_html(get_post_meta($post->ID, '_post_quote_value', true)); ?>”
|
||||
</h2>
|
||||
|
||||
<?php if ($quoteLink!="") {?>
|
||||
<span class="quote-source">
|
||||
— <?php echo wp_kses_post($quoteLink) ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
<div class="blog-entry">
|
||||
<?php the_content() ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<!-- end blog item -->
|
||||
7
formats/blog-classic/search-post-meta.php
Normal file
7
formats/blog-classic/search-post-meta.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="blog-meta">
|
||||
<span><i class="kk kk-icon-pencil"></i><?php the_author(); ?></span>
|
||||
/
|
||||
<span><i class="kk kk-icon-clock"></i><time datetime="<?php the_modified_date( 'c' ) ?>"><?php the_time( get_option( 'date_format' ) ); ?></time></span>
|
||||
/
|
||||
<span><a title="<?php printf(__('View comments to %s', 'toppic'), get_the_title()); ?>" href="<?php comments_link(); ?> "><i class="kk kk-icon-comment-empty"></i><?php comments_number(__('0 Comments', 'toppic'), __('1 Comment', 'toppic'), __('% Comments', 'toppic'))?></a></span>
|
||||
</div>
|
||||
70
formats/blog-classic/standard.php
Normal file
70
formats/blog-classic/standard.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<!-- start blog item -->
|
||||
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">
|
||||
|
||||
<!-- start content -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
<div class="post-content">
|
||||
<div class="blog-date">
|
||||
<span class="span-day"><?php echo get_the_time('d');?></span>
|
||||
<span class="span-month"><?php echo get_the_time('M');?></span>
|
||||
</div>
|
||||
<?php if (function_exists('printLikes')) { ?>
|
||||
<div class="kk-likes">
|
||||
<?php printLikes(get_the_ID()); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-content">
|
||||
|
||||
<!--start image -->
|
||||
<?php if(has_post_thumbnail()): ?>
|
||||
<div class="blog-thumb effect-zoom">
|
||||
|
||||
<?php
|
||||
$image_thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'featured-image-thumb' );
|
||||
|
||||
if (get_option('toppic_theme_blog_sidebar') !== 'full') {
|
||||
$image_size = 'medium_large';
|
||||
} else {
|
||||
$image_size = 'large';
|
||||
}; ?>
|
||||
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
|
||||
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
|
||||
<?php echo get_the_post_thumbnail( get_the_id(), $image_size, array( 'data-lazy-load' => 0 ) ); ?>
|
||||
</a>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<a class="kk-lightbox zoom" href="<?php echo esc_url($image_thumb[0]); ?>" title="<?php esc_attr( esc_html_e( 'Open Image', 'toppic' ) ) ?>">
|
||||
<?php echo get_the_post_thumbnail( get_the_id(), $image_size, array( 'data-lazy-load' => 0 ) ); ?>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<!--end image -->
|
||||
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
|
||||
<h2 class="blog-title">
|
||||
<a href="<?php the_permalink() ?>"><?php the_title() ?></a>
|
||||
</h2>
|
||||
|
||||
<!--start meta -->
|
||||
<?php get_template_part( 'formats/blog-classic/post-meta' ); ?>
|
||||
<!--end meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<!-- end blog item -->
|
||||
48
formats/blog-classic/video.php
Normal file
48
formats/blog-classic/video.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<!-- start blog item -->
|
||||
<article <?php post_class('data'); ?> id="post-<?php the_ID() ?>">
|
||||
|
||||
<!-- start content -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
<div class="post-content">
|
||||
<div class="blog-date">
|
||||
<span class="span-day"><?php echo get_the_time('d');?></span>
|
||||
<span class="span-month"><?php echo get_the_time('M');?></span>
|
||||
</div>
|
||||
<?php if (function_exists('printLikes')) { ?>
|
||||
<div class="kk-likes">
|
||||
<?php printLikes(get_the_ID()); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-content">
|
||||
|
||||
<!--start video -->
|
||||
|
||||
<div class="blog-thumb">
|
||||
<div class="embed-container">
|
||||
<?php echo get_post_meta($post->ID, '_post_video_value', true); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--end video -->
|
||||
<?php if (is_home() || is_search() || is_archive()): ?>
|
||||
|
||||
<h2 class="blog-title">
|
||||
<a href="<?php the_permalink() ?>"><?php the_title() ?></a>
|
||||
</h2>
|
||||
|
||||
<!--start meta -->
|
||||
<?php get_template_part( 'formats/blog-classic/post-meta' ); ?>
|
||||
<!--end meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="blog-entry">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
<!-- end blog item -->
|
||||
Reference in New Issue
Block a user