-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpage-blog.php
65 lines (62 loc) · 1.7 KB
/
page-blog.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
61
62
63
64
65
<?php
/*
Template Name: Blog Page
*/
?>
<?php get_header(); ?>
<?php
$options = get_option('odm_options');
$date_to_show = isset($options['single_page_date']) ? $options['single_page_date'] : "metadata_created";
?>
<section class="container section-title main-title">
<header class="row">
<div class="eight columns">
<h1><?php the_title(); ?></h1>
</div>
</header>
</section>
<?php
global $paged;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
<?php query_posts('post_type=post&post_status=publish&posts_per_page=25&paged='. $paged); ?>
<?php if( have_posts() ): ?>
<section id="blog" class="container">
<div id="post-content" class="row">
<div class="sixteen columns">
<?php
$index = 1;
while (have_posts()) : the_post();
if (should_open_row("blog-layout-2-cols",$index)): ?>
<div class="row">
<?php endif;
odm_get_template('post-blog-layout-2-cols',array(
"post" => get_post(),
"show_meta" => true,
"meta_fields" => array("date","categories","tags"),
"show_source_meta" => true,
"show_thumbnail" => true,
"show_excerpt" => true,
"summary_translated" => true,
"header_tag" => true,
"order" => $date_to_show,
"index" => $index
),true);
if (should_close_row("blog-layout-2-cols",$index)): ?>
</div>
<?php endif;
$index++;
endwhile; ?>
</div>
</div>
</section>
<?php endif; ?>
<section class="container">
<div class="row">
<div class="sixteen columns">
<?php odm_get_template('pagination',array(),true); ?>
</div>
</div>
</section>
<?php wp_reset_query(); ?>
<?php get_footer(); ?>