Skip to content

Commit

Permalink
Removal of the extra loop on the home page that handles the posts_per…
Browse files Browse the repository at this point in the history
…_page and what categories, it's not needed anymore
  • Loading branch information
Frumph committed Dec 17, 2012
1 parent a6b7942 commit d17ea74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions functions.php
Expand Up @@ -203,6 +203,8 @@ function __comicpress_init() {
// Set the posts per page on the home page
function comicpress_blogpostcount_filter($query) {
if ( $query->is_home() && $query->is_main_query() ) {
$blog_cats = comicpress_all_blog_categories_array();
if (!empty($blog_cats)) $query->set('category__in', $blog_cats);
$query->set('posts_per_page', comicpress_themeinfo('blog_postcount'));
}
return $query;
Expand Down
5 changes: 1 addition & 4 deletions index.php
Expand Up @@ -24,9 +24,6 @@
if (!comicpress_themeinfo('disable_blog_frontpage')) {
Protect();
if (!comicpress_themeinfo('split_column_in_two')) {
$paged = get_query_var('paged');
$blog_query = 'showposts='.comicpress_themeinfo('blog_postcount') .'&cat='.comicpress_exclude_comic_categories().'&paged='.$paged;
$posts = &query_posts($blog_query);
if (have_posts()) { ?>
<?php if (comicpress_themeinfo('enable_caps')) { ?><div class="blogindex-head"></div><?php } ?>
<div class="blogindex">
Expand All @@ -43,7 +40,7 @@
UnProtect();
}

if (is_active_sidebar('under-blog')) get_sidebar('underblog');
comicpress_get_sidebar('underblog');

get_footer();
?>

0 comments on commit d17ea74

Please sign in to comment.