diff --git a/comiceasel.php b/comiceasel.php index 7d5e399..496de79 100644 --- a/comiceasel.php +++ b/comiceasel.php @@ -54,7 +54,7 @@ function ceo_initialize_post_types() { 'query_var' => true, 'capability_type' => 'post', 'taxonomies' => array( 'post_tag' ), - 'rewrite' => array( 'slug' => 'comic', 'with_front' => false, 'feeds' => true ), + 'rewrite' => array( 'slug' => 'comic', 'with_front' => true, 'feeds' => true ), 'hierarchical' => false, 'can_export' => true, 'show_in_menu' => true, diff --git a/functions/filters.php b/functions/filters.php index 93b71c6..d44985b 100644 --- a/functions/filters.php +++ b/functions/filters.php @@ -64,14 +64,14 @@ function ceo_change_next_rel_link_two($link) { } function ceo_query_post_type($query) { - if (is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { + if ( ( is_tag() || is_archive()) && empty( $query->query_vars['suppress_filters'] ) ) { $post_type = get_query_var('post_type'); - if($post_type) : - $post_type = $post_type; - else: + if ( is_array($post_type) && !empty($post_type) ) { + $post_type = array_merge($post_type, array('comic')); + } else { $post_type = array('post','comic'); - $query->set('post_type',$post_type); - endif; + } + $query->set('post_type', $post_type); return $query; } }