-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate-blog.php
More file actions
88 lines (63 loc) · 2.48 KB
/
template-blog.php
File metadata and controls
88 lines (63 loc) · 2.48 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
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Template Name: Blog
*
* The blog page template displays the "blog-style" template on a sub-page.
*
* @package WooFramework
* @subpackage Template
*/
global $woo_options;
get_header();
/**
* The Variables
*
* Setup default variables, overriding them if the "Theme Options" have been saved.
*/
$settings = array(
'thumb_w' => 100,
'thumb_h' => 100,
'thumb_align' => 'alignleft'
);
$settings = woo_get_dynamic_values( $settings );
?>
<!-- #content Starts -->
<div id="content">
<div class="col-full">
<?php woo_main_before(); ?>
<section id="main" class="col-left">
<?php woo_loop_before(); ?>
<?php
if ( get_query_var( 'paged') ) { $paged = get_query_var( 'paged' ); } elseif ( get_query_var( 'page') ) { $paged = get_query_var( 'page' ); } else { $paged = 1; }
$query_args = array(
'post_type' => 'post',
'paged' => $paged
);
$query_args = apply_filters( 'woo_blog_template_query_args', $query_args ); // Do not remove. Used to exclude categories from displaying here.
remove_filter( 'pre_get_posts', 'woo_exclude_categories_homepage' );
query_posts( $query_args );
if ( have_posts() ) {
$count = 0;
while ( have_posts() ) { the_post(); $count++;
/* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
} // End WHILE Loop
} else {
?>
<article <?php post_class(); ?>>
<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
</article><!-- /.post -->
<?php } // End IF Statement ?>
<?php woo_loop_after(); ?>
<?php woo_pagenav(); ?>
<?php wp_reset_query(); ?>
</section><!-- /#main -->
<?php woo_main_after(); ?>
<?php get_sidebar(); ?>
</div><!-- /.col-full -->
</div><!-- /#content -->
<?php get_footer(); ?>