dededey
9/29/2015 - 8:57 AM

add custom post type to category pages general http://premium.wpmudev.org/blog/add-custom-post-types-to-tags-and-categories-in-wordpress/

function add_custom_types_to_tax( $query ) {
  if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
  
  // Get all your post types
  $post_types = get_post_types();
  // $post_types = array( 'post', 'your_custom_type' );
  
  $query->set( 'post_type', $post_types );
  return $query;
  }
}
add_filter( 'pre_get_posts', 'add_custom_types_to_tax' );