Revision: 51291
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 20, 2011 17:24 by IronMANro
Initial Code
add_filter('pre_get_posts', 'query_post_type');
function query_post_type($query) {
if(is_category() || is_tag() || is_home() && empty( $query->query_vars['suppress_filters'] ) ) {
$post_type = get_query_var('post_type');
if($post_type)
$post_type = $post_type;
else
$post_type = array('post','articles','nav_menu_item');
$query->set('post_type',$post_type);
return $query;
}
}
Initial URL
http://wordpress.org/support/topic/custom-post-type-tagscategories-archive-page/page/2
Initial Description
add this in functions.php
Initial Title
Custom post type tags/categories archive page
Initial Tags
post, wordpress, category
Initial Language
PHP