title: blank post.php with custom-post-type on wordpress 3 submit
body: <p>I'm developing a theme for the first time, like my first big project. I wrote out in my functions.php</p>
  
  <p>Everything went smoothly. I have 3 custom meta boxes in a custom post type which is for Bands Gigs.</p>
  
  <p>The meta boxes are Gig Venue, Gig Country, Gig Date.</p>
  
  <p>everything shows up in the admin panel, you can click the add new gig, enter all the info. However once you hit publish, it redirects to /wp-admin/post.php and it is completely blank.</p>
  
  <p>If I just delete the post.php from the url bar, it takes me back to the admin panel and the gig has been posted and it shows up in the Band Gigs main list.</p>
  
  <p>This doesn't happen just for the new custom post-type, but also for even adding new pages too. I wrote a function to hide the POSTS, MEDIA, LINKS menu items from admin panel since they are not needed in this theme.</p>
  
  <p>Anyone else have this problem, is there a simple fix that i'm just not figuring out?</p>
  
  <p>THINGS I'VE TRIED:
  - Delete theme, reinstall.
  - Deleted DB and fresh install of DB
  - Deleted WP alltogether with a fresh install with the theme already uploaded in the themes folder.</p>
  
  <p>still nothing.</p>
  
  <p>All help, or fingers pointing in the right direction would be amazing. Nooby as PHP here.</p>
  
  <p>here is the functions.php code I've written, following some tutorials online.</p>
  
  <pre><code>&lt;?php
  
  // remove menu items that are not needed for this specific theme
  function remove_menus () {
  global $menu;
          $restricted = array(
                  __('Posts'),
                  __('Media'),
                  __('Links'),
                  __('Comments'),
          );
  
          end ($menu);
          while (prev($menu)){
              $value = explode(' ',$menu[key($menu)][0]);
              if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
          }
  }
  add_action('admin_menu', 'remove_menus');
  
  
  
  // create custom post type for GIGS
  add_action('init', 'gig_register');
  
  function gig_register() {
  
      $labels = array(
          'name' =&gt; _x('Band Gigs', 'post type general name'),
          'singular_name' =&gt; _x('Band Gig', 'post type singular name'),
          'add_new' =&gt; _x('Add New Gig', 'show date'),
          'add_new_item' =&gt; __('Add New Gig Date'),
          'edit_item' =&gt; __('Edit Gig Date'),
          'new_item' =&gt; __('New Gig Date'),
          'view_item' =&gt; __('View Gig Date'),
          'search_items' =&gt; __('Search Gigs'),
          'not_found' =&gt;  __('Nothing found'),
          'not_found_in_trash' =&gt; __('Nothing found in Trash'),
          'parent_item_colon' =&gt; '',
      );
  
      $args = array(
          'labels' =&gt; $labels,
          'public' =&gt; true,
          'publicly_queryable' =&gt; true,
          'show_ui' =&gt; true,
          'query_var' =&gt; true,
          'menu_icon' =&gt; get_stylesheet_directory_uri() . '/images/calendar_pencil.png',
          'rewrite' =&gt; true,
          'capability_type' =&gt; 'post',
          'hierarchical' =&gt; false,
          'menu_position' =&gt; null,
          'supports' =&gt; array(
              'custom-fields' =&gt; true,
          ),
        ); 
  
      register_post_type( 'gigs' , $args );
  }
  
  
  
  // create custom meta boxes for show dates / locations
  add_action("admin_init", "admin_init");
  
  function admin_init() {
      add_meta_box("gig_venue_meta", "Gig Venue", "gig_venue", "gigs", "normal", "low");
      add_meta_box("gig_country_meta", "Gig Country", "gig_country", "gigs", "normal", "low");
      add_meta_box("gig_time_meta", "Gig Date || Date format must be M,D,Y (ex: 5/12/2012)", "gig_date", "gigs", "normal", "low");
  }
  
  
  
  // create inputs for custom meta boxes
  function gig_venue(){
    global $post;
    $custom = get_post_custom($post-&gt;ID);
    $gig_venue = $custom["gig_venue"][0];
    ?&gt;
    &lt;label&gt;Venue Name:&lt;/label&gt;
    &lt;input name="gig_venue" value="&lt;?php echo $gig_venue; ?&gt;" placeholder="Enter Venue Name Here" /&gt;
    &lt;?php
  }
  
  function gig_country(){
    global $post;
    $custom = get_post_custom($post-&gt;ID);
    $gig_country = $custom["gig_country"][0];
    ?&gt;
    &lt;label&gt;Gig Country:&lt;/label&gt;
    &lt;input name="gig_country" value="&lt;?php echo $gig_country; ?&gt;" placeholder="Enter Country Here" /&gt;
    &lt;?php
  }
  
  function gig_date(){
    global $post;
    $custom = get_post_custom($post-&gt;ID);
    $gig_date = $custom["gig_date"][0];
    ?&gt;
    &lt;label&gt;Gig Time:&lt;/label&gt;
    &lt;input name="gig_date" value="&lt;?php echo $gig_date; ?&gt;" placeholder="Enter Gig Date Here" /&gt;
    &lt;?php
  }
  // end creation of inputs for custom meta boxes
  
  
  // save custom meta boxes info
  add_action('save_post', 'save_details');
  
  function save_details(){
      global $post;
  
      update_post_meta($post-&gt;ID, "gig_venue", $_POST["gig_venue"]);
      update_post_meta($post-&gt;ID, "gig_country", $_POST["gig_country"]);
      update_post_meta($post-&gt;ID, "gig_date", $_POST["gig_date"]);
  } 
  // end save custom meta box info
  
  
  // edit gig page list info
  add_action("manage_posts_custom_column", "gigs_custom_columns");
  add_filter("manage_edit-gigs_columns", "gigs_edit_columns");
  
  function gigs_edit_columns($columns) {
      $columns = array(
              "cb" =&gt; "&lt;input type=\"checkbox\" /&gt;",
              "gig_venue" =&gt; "Gig Venue",
              "gig_country" =&gt; "Gig Country",
              "gig_date" =&gt; "Gig Date",
      );
  
      return $columns;
  }
  
  function gigs_custom_columns($columns) {
      global $post;
  
      switch ($columns) {
          case "gig_venue":
              $custom = get_post_custom();
              echo $custom["gig_venue"][0];
              break;
          case "gig_country":
              $custom = get_post_custom();
              echo $custom["gig_country"][0];
              break;
          case "gig_date":
              $custom = get_post_custom();
              echo $custom["gig_date"][0];
              break;
      }
  }
  // end edit gig page list info
  
  
  
  ?&gt;
  </code></pre>