Show comics in the regular archives as well.

This commit is contained in:
Frumph
2012-07-02 07:38:14 -07:00
parent c56bfe5762
commit 291a19bcba
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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,
+6 -6
View File
@@ -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;
}
}