On January 15, 2015 at 7:47 am
Open up functions.php and replace this:
function asteria_home_query($query) {
if ( $query->is_home()) {
global $asteria;
set_query_var( 'post_type', 'post' );
set_query_var( 'paged', ( get_query_var('paged') ? get_query_var('paged') : 1) );
if(!empty($asteria['enable_cat'])){
$postcount = $asteria['n_posts_field_id'];
$postcat = $asteria['posts_cat_id'];
set_query_var( 'posts_per_page', ''.$postcount.'' );
if(!empty($asteria['posts_cat_id'])){set_query_var( 'cat', ''.implode(',', $postcat).'' );}
}
}
}
add_action( 'pre_get_posts', 'asteria_home_query' );
with this:
function asteria_home_query($query) {
if ( $query->is_home()) {
global $asteria;
set_query_var( 'post_type', 'post' );
set_query_var( 'paged', ( get_query_var('paged') ? get_query_var('paged') : 1) );
if(!empty($asteria['enable_cat'])){
$postcount = $asteria['n_posts_field_id'];
$postcat = $asteria['posts_cat_id'];
set_query_var( 'posts_per_page', ''.$postcount.'' );
if(!empty($asteria['posts_cat_id'])){set_query_var( 'cat', ''.implode(',', $postcat).'' );}
}
}
if ( $query->is_category()) {
set_query_var( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'asteria_home_query' );