title: post_type page redirect to random post
body: <p>I created a post_type.
  for some reason when i go to
  <code>http://localhost/post_type/</code>
  its redirect me to
  <code>http://localhost/post_type/random_post/</code></p>
  <p>where is my mistake ?</p>
  <p>my post_type code is:</p>
  <pre><code>function bookworm_blog_cpt() {
      global $book; // name of the post_type
      register_post_type( &quot;{$book}&quot;, array(
          'labels' =&gt; array(
              'name' =&gt; &quot;{$book}&quot;,
              'singular_name' =&gt; &quot;{$book}&quot;,
              'menu_name'          =&gt; $book ,
              'rewrite' =&gt; array('slug' =&gt; $book ),
              ),
          'description' =&gt; &quot;{$book}s which we will be discussing on this blog.&quot;,
          'public' =&gt; true, 'show_ui' =&gt; true,
          'menu_position' =&gt; 20,
          'supports' =&gt; array( 'title', 'editor',
                              'post-formats',
                              'tags', 'excerpt', 'thumbnail', 'custom-fields' ) ,
          'has_archive'   =&gt; true,
      ));
  
      add_filter( &quot;manage_edit-{$book}_columns&quot;, 'my_edit_book_columns' ) ;
      function my_edit_book_columns( $columns ) {
          global $book;
          $columns = array(
              'cb' =&gt; '&amp;lt;input type=&quot;checkbox&quot; /&gt;',
              'title' =&gt; __( &quot;{$book}&quot; ),
              &quot;{$book}_tag&quot; =&gt; __( &quot;{$book}_tag&quot; ),
              //'genre' =&gt; __( 'Genre' ),
              &quot;{$book}_cat&quot; =&gt; __( &quot;{$book}_cat&quot; ),
              'date' =&gt; __( 'Date' ),
              'mime_type' =&gt; __( 'mime_type' )
          );
          return $columns;
      }
  }
  </code></pre>
  <p>and i dont have any code in home page, and <code>single-post_type.php</code> is eampty.</p>
  <p>thanks for the help.</p>
  <p><strong>edit:</strong> the problem is the same when i use <code>Custom Post Type UI</code> plugin, so i dont know where is the problem for.</p>
  <p><strong>edit2:</strong>  it was probably something in my other files, i re installed wordpress and the error is gone.</p>