forked from rahmanda/pigura-wp-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
60 lines (59 loc) · 1.84 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php get_header(); ?>
<div class="main-content">
<?php
if(have_posts()): ?>
<div class="piguras">
<?php
while(have_posts()) : the_post(); ?>
<div class="pigura">
<span class="pigura-thumb">
<a href="<?php the_permalink(); ?>">
<!-- get the cover / second feature image -->
<?php
if( class_exists('Dynamic_Featured_Image') ) {
global $dynamic_featured_image;
$featured_images = $dynamic_featured_image->get_featured_images();
if (count($featured_images) > 0) {
?>
<img src="<?php echo $featured_images[0]['thumb']; ?>" />
<?php
} else {
the_post_thumbnail('thumb');
} } else {
the_post_thumbnail('thumb');
}
?>
</a>
</span>
<span class="pigura-info">
<span class="pigura-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
<span class="pigura-author">
oleh <a class="name" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a>
</span>
<span class="pigura-tags">
<?php the_tags('',', '); ?>
</span>
</span>
<span class="pigura-stats">
<span class="loves"><i class="fa fa-heart"></i> <?php $loves_count = get_post_meta(get_the_ID(), "votes_count", true); if($loves_count): echo $loves_count; else: echo 0; endif; ?></span>
<span class="comments"><i class="fa fa-comment"></i> <?php $comments_count = wp_count_comments(get_the_ID()); echo $comments_count->total_comments; ?></span>
</span>
</div>
<?php
endwhile;
?>
</div>
<div class="page-control">
<div class="control-group">
<?php
previous_posts_link('<i class="fa fa-chevron-circle-left"></i>');
next_posts_link('<i class="fa fa-chevron-circle-right"></i>'); ?>
</div>
</div>
<?php
else :
echo '<p>No content found.</p>';
endif;
?>
</div>
<?php get_footer(); ?>