mirror of
https://github.com/Frumph/comic-easel.git
synced 2026-07-21 00:35:30 -04:00
Show comics in the regular archives as well.
This commit is contained in:
+1
-1
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user