-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloop.php
More file actions
executable file
·105 lines (66 loc) · 3.02 KB
/
loop.php
File metadata and controls
executable file
·105 lines (66 loc) · 3.02 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
* "loop" to display posts when using an existing query. Uses content.php template
* to render in normal format.
*/
?>
<?php
global $bunyad_loop;
if (!is_object($bunyad_loop)) {
$bunyad_loop = $wp_query;
}
if ($bunyad_loop->have_posts()):
?>
<!-- BlenderNation changes -->
<?php include( 'ads/responsive.php'); ?>
<div class="h32"> </div>
<!-- BlenderNation changes -->
<div class="row listing">
<?php while ($bunyad_loop->have_posts()): $bunyad_loop->the_post(); ?>
<div class="column half">
<article <?php post_class('highlights'); ?> itemscope itemtype="http://schema.org/Article">
<?php
// object has category taxonomy? i.e., is it a post?
if (in_array('category', get_object_taxonomies(get_post_type()))):
// display category label when not in a category archive
$category = current(get_the_category());
?>
<span class="cat-title cat-<?php echo $category->cat_ID; ?>"><a href="<?php echo esc_url(get_category_link($category));
?>"><?php echo esc_html($category->name); ?></a></span>
<?php endif; ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="image-link">
<?php the_post_thumbnail('main-block', array('class' => 'image', 'title' => strip_tags(get_the_title()), 'itemprop' => 'image')); ?>
<?php if (get_post_format()): ?>
<span class="post-format-icon <?php echo esc_attr(get_post_format()); ?>"><?php
echo apply_filters('bunyad_post_formats_icon', ''); ?></span>
<?php endif; ?>
</a>
<div class="meta">
<time datetime="<?php echo get_the_date(__('Y-m-d\TH:i:sP', 'bunyad')); ?>" itemprop="datePublished"><?php echo get_the_date(); ?> </time>
<?php echo apply_filters('bunyad_review_main_snippet', ''); ?>
<span class="comments">
<a href="<?php the_permalink(); ?>"><?php echo get_comments_number(); ?></a>
</span>
<span class="comments" style="margin-right:0px;">
<a href="<?php the_permalink(); ?>"><i class="fa fa-comments-o"></i></a>
</span>
</div>
<h2 itemprop="name"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" itemprop="url"><?php the_title(); ?></a></h2>
<div class="excerpt"><?php echo Bunyad::posts()->excerpt(null, 15, array('add_more' => false)); ?></div>
</article>
</div>
<?php endwhile; ?>
</div>
<?php if (!Bunyad::options()->blog_no_pagination): // pagination can be disabled ?>
<div class="main-pagination">
<?php echo Bunyad::posts()->paginate(array(), $bunyad_loop); ?>
</div>
<?php endif; ?>
<?php else: ?>
<article id="post-0" class="page no-results not-found">
<div class="post-content">
<h1><?php _e( 'Nothing Found!', 'bunyad' ); ?></h1>
<p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'bunyad'); ?></p>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>