forked from thicolares/TEDxTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·40 lines (33 loc) · 1.05 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
<?php
get_header();
$query = new TEDxQuery();
$sticky_posts = $query->sticky_posts(5);
$unsticky_posts = $query->unsticky_posts();
?>
<div class="container spacing-top">
<div class="row">
<div class="col-md-9">
<div class="page-header">
<h4><?= TEDxHelpers::index_title('Blog Posts'); ?></h4>
</div>
<!-- .page-header -->
<?php
if (count($unsticky_posts) > 0):
foreach ($unsticky_posts as $index => $post): setup_postdata($post);
WP_Render::partial('partials/blog/_post_excerpt.php');
endforeach;
else:
WP_Render::partial('partials/_not_found.php', ['message' => 'There does not appear to be any posts here...']);
endif;
?>
<?php WP_Render::partial('partials/_pagination.php', ['offset' => count($sticky_posts)]); ?>
</div>
<!-- .col-md-8 -->
<div class="col-md-3">
<?php get_sidebar(); ?>
</div>
<!-- .col-md-4 -->
</div>
<!-- .row -->
</div><!-- .container -->
<?php get_footer(); ?>