This repository has been archived by the owner on Nov 1, 2019. It is now read-only.
forked from thicolares/TEDxTheme
-
Notifications
You must be signed in to change notification settings - Fork 1
/
home.php
49 lines (33 loc) · 1.36 KB
/
home.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
<?php // home.php
get_header();
$query = new TEDxQuery();
$unsticky_posts = $query->unsticky_posts();
?>
<div class="page-contents">
<div class="container">
<div class="row">
<div id="main" class="col-md-9">
<div class="page-header">
<h3>Recent Posts</h3>
</div>
<?php
if ( count( $unsticky_posts ) > 0) {
global $post;
foreach ( $unsticky_posts as $index => $post ) {
setup_postdata($post);
WP_Render::partial('partials/blog/_post_excerpt.php');
}
}
else {
WP_Render::partial('partials/_not_found.php', ['message' => 'There does not appear to be any posts here...']);
}
?>
<?php WP_Render::partial('partials/_pagination.php', ['offset' => count( $unsticky_posts ) ]); ?>
</div>
<div id="sidebar" class="col-md-3">
<?php get_sidebar(); ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>