Permalink
Browse files

Removal of the extra loop on the home page that handles the posts_per…

…_page and what categories, it's not needed anymore
  • Loading branch information...
1 parent a6b7942 commit d17ea74640dca2f32f6d3413181d0500e534fa66 @Frumph committed Dec 17, 2012
Showing with 3 additions and 4 deletions.
  1. +2 −0 functions.php
  2. +1 −4 index.php
View
2 functions.php
@@ -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;
View
5 index.php
@@ -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">
@@ -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.