2009-12-22 22:20:11 +00:00
|
|
|
<?php get_header(); ?>
|
|
|
|
<?php include(get_template_directory() . '/layout-head.php'); ?>
|
2009-11-13 16:00:25 +00:00
|
|
|
|
2009-12-22 22:20:11 +00:00
|
|
|
<?php
|
|
|
|
if (have_posts()) : while (have_posts()) : the_post();
|
|
|
|
if (in_comic_category()) {
|
|
|
|
if (!$comicpress_options['disable_comic_blog_single']) {
|
2009-12-24 23:01:47 +00:00
|
|
|
comicpress_display_post();
|
2009-12-22 22:20:11 +00:00
|
|
|
$cur_date = mysql2date('Y-m-j', $post->post_date);
|
|
|
|
$next_comic = get_next_comic();
|
|
|
|
$next_comic = (array)$next_comic;
|
|
|
|
$next_date = mysql2date('Y-m-j', $next_comic['post_date']);
|
2009-12-31 23:32:17 +00:00
|
|
|
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&order=asc&cat=-'.exclude_comic_categories();
|
2009-12-22 22:20:11 +00:00
|
|
|
}
|
|
|
|
} else {
|
2009-12-24 23:01:47 +00:00
|
|
|
comicpress_display_post();
|
2009-12-22 22:20:11 +00:00
|
|
|
}
|
|
|
|
endwhile;
|
|
|
|
?>
|
2009-11-20 19:04:19 +00:00
|
|
|
|
2009-12-24 15:36:49 +00:00
|
|
|
<?php if (function_exists('the_project_wonderful_ad')) {
|
|
|
|
the_project_wonderful_ad('blog');
|
|
|
|
} ?>
|
2009-11-20 19:04:19 +00:00
|
|
|
<?php get_sidebar('blog'); ?>
|
|
|
|
|
|
|
|
<?php
|
2009-11-22 19:56:35 +00:00
|
|
|
if ($comicpress_options['static_blog'] && in_comic_category()) {
|
|
|
|
if (!$comicpress_options['split_column_in_two']) {
|
2009-12-31 23:32:17 +00:00
|
|
|
$blog_query = 'showposts='.$comicpress_options['blog_postcount'].'&cat="-'.exclude_comic_categories().'"&paged='.$paged;
|
2009-11-20 19:04:19 +00:00
|
|
|
|
|
|
|
$posts = query_posts($blog_query);
|
|
|
|
if (have_posts()) { ?>
|
|
|
|
|
2009-11-22 19:56:35 +00:00
|
|
|
<?php if (!$comicpress_options['disable_blogheader']) { ?>
|
2009-11-20 19:04:19 +00:00
|
|
|
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<div class="blogindex-head"></div>
|
|
|
|
<div class="blogindex">
|
|
|
|
<?php while (have_posts()) : the_post();
|
|
|
|
|
2009-12-24 23:01:47 +00:00
|
|
|
comicpress_display_post();
|
2009-11-20 19:04:19 +00:00
|
|
|
|
|
|
|
endwhile; ?>
|
|
|
|
</div>
|
|
|
|
<div class="blogindex-foot"></div>
|
|
|
|
<?php }
|
|
|
|
comicpress_pagination();
|
|
|
|
} else {
|
|
|
|
comicpress_dual_columns();
|
|
|
|
}
|
|
|
|
} else {
|
2009-11-13 16:00:25 +00:00
|
|
|
|
2009-11-22 19:56:35 +00:00
|
|
|
if ($comicpress_options['blogposts_with_comic']) {
|
2009-11-13 16:00:25 +00:00
|
|
|
|
|
|
|
$temppost = $post;
|
|
|
|
$temp_query = $wp_query;
|
|
|
|
|
|
|
|
if (in_comic_category() && !empty($blog_query)) {
|
|
|
|
function filter_where($where = '') {
|
|
|
|
global $cur_date, $next_date;
|
|
|
|
$where .= " AND post_date >= '".$cur_date."' AND post_date < '".$next_date."'";
|
|
|
|
return $where;
|
|
|
|
}
|
|
|
|
add_filter('posts_where', 'filter_where');
|
|
|
|
$posts = query_posts($blog_query);
|
|
|
|
if (have_posts()) { while (have_posts()) : the_post();
|
2009-12-24 23:01:47 +00:00
|
|
|
comicpress_display_post();
|
2009-11-13 16:00:25 +00:00
|
|
|
endwhile; }
|
|
|
|
}
|
|
|
|
$post = $temppost; $wp_query = $temp_query; $temppost = null; $temp_query = null;
|
2009-11-18 23:15:24 +00:00
|
|
|
}
|
2009-11-20 19:04:19 +00:00
|
|
|
}
|
2009-11-30 17:40:08 +00:00
|
|
|
|
|
|
|
comments_template('', true);
|
|
|
|
|
2009-11-20 19:04:19 +00:00
|
|
|
?>
|
2009-11-13 16:00:25 +00:00
|
|
|
|
|
|
|
<?php else: ?>
|
|
|
|
<?php get_sidebar('underblog'); ?>
|
2009-12-24 23:15:30 +00:00
|
|
|
<div <?php post_class(); ?>>
|
2009-11-13 16:00:25 +00:00
|
|
|
<div class="post-head"></div>
|
|
|
|
<div class="post">
|
|
|
|
<p><?php _e('Sorry, no posts matched your criteria.','comicpress'); ?></p>
|
2009-11-17 07:00:47 +00:00
|
|
|
<div class="clear"></div>
|
2009-11-13 16:00:25 +00:00
|
|
|
</div>
|
|
|
|
<div class="post-foot"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php include(get_template_directory() . '/layout-foot.php'); ?>
|
|
|
|
<?php get_footer() ?>
|