WP conflict with query and post_type
<p>I am having a conflicting issue with a custom post type. On my archive pages, the custom post type was not showing up with the general posts, so I had to add in this <code>pre_get_posts</code> filter:</p>

<pre><code>add_action( 'init', 'editions' );
function editions() {
  $labels = array(
  'name'               =&gt; _x( 'Editions', 'post type general name' ),
  'singular_name'      =&gt; _x( 'Edtiion', 'post type singular name' ),
  'add_new'            =&gt; _x( 'Add New', 'book' ),
  'add_new_item'       =&gt; __( 'Add New Edition' ),
  'edit_item'          =&gt; __( 'Edit Edition' ),
  'new_item'           =&gt; __( 'New Edition' ),
  'all_items'          =&gt; __( 'All Editions' ),
  'view_item'          =&gt; __( 'View Edition' ),
  'search_items'       =&gt; __( 'Search Editions' ),
  'not_found'          =&gt; __( 'No editions found' ),
  'not_found_in_trash' =&gt; __( 'No editions found in the Trash' ), 
  'parent_item_colon'  =&gt; '',
  'menu_name'          =&gt; 'Editions',
);
$args = array(
  'labels'        =&gt; $labels,
  'description'   =&gt; 'Editions and edition specific data',
  'menu_icon'     =&gt; 'dashicons-building',
  'public'        =&gt; true,
  'menu_position' =&gt; 5,
  'supports'      =&gt; array( 'title', 'editor', 'author', 'thumbnail', 'excerpt' ),
  'taxonomies'    =&gt; array( 'edition', 'post_tag'),
  'has_archive'   =&gt; true,
);
register_post_type( 'edition', $args ); 
}

add_action( 'init', 'register_taxonomy_for_edition' );
function register_taxonomy_for_edition() {
  register_taxonomy_for_object_type( 'post_tag', 'edition' );
};
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
    if( !is_admin() ) {
        if ( !is_post_type_archive() &amp;&amp; $query-&gt;is_archive() ) {
            $query-&gt;set( 'post_type', array( 'post', 'edition' ) );
        }
    return $query;
    }
}
</code></pre>

<p>This does what I want it to do, and in the archive page shows the general posts, and a custom post type I defined called 'Edition'</p>

<p>However, when I try to make a custom query to only call the custom post type, and no other posts... it just returns ALL posts regardless of the post_type definition i set:</p>

<pre><code>&lt;?php get_header(); ?&gt;
&lt;?php 
  $args = array(
          'post_type'      =&gt; 'edition',
          'posts_per_page' =&gt; -1
  );

  $allgemeine = new WP_Query( $args ); 
  while ( $allgemeine-&gt;have_posts() ) : $allgemeine-&gt;the_post(); 
    the_content();
  endwhile; ?&gt;
  &lt;?php wp_reset_postdata(); ?&gt; 
&lt;?php get_footer(); ?&gt;
</code></pre>

<p>When I remove the pre_get_posts filter from mzy <code>functions.php</code>, the loop works perfect, but the custom post types do not show in the archive page.</p>

<p>Any ideas why this conflict is happening?</p>