title: Wordpress custom field (select) to posts
body: <p>I'm trying to understand plugins by making one. It puts a new menu to Wordpress Admin menu "Propagandas (ads)", which creates a post type "propaganda_item".</p>
  
  <p>Since I need the user to choose a State/City for each "Propaganda", I've made an SQL table with City/State.</p>
  
  <p>So far, so good, but now I don't know how to put the php select combobox in the "Propaganda" edit page.
  <a href="http://i.stack.imgur.com/uTcEm.jpg" rel="nofollow">Example of what I mean</a></p>
  
  <p>Actually I know how to populate the Select, but not how to put it within the post through my plugin.</p>
  
  <p>Oh, and here is my plugin code:</p>
  
  <pre><code>&lt;?php 
  /*
  Plugin Name: Frankec
  Plugin URI: 
  Description: propagandas
  Version:1
  Author URI:
  */?&gt;
  
  &lt;?php// Registra Propagandas
  
  function register_cpt_Propagandas() {
  
  $labels = array(
      'name' =&gt; _x( 'Propagandas', 'propaganda_item' ),
      'singular_name' =&gt; _x( 'Propagandas', 'propaganda_item' ),
      'add_new' =&gt; _x( 'Nova', 'propaganda_item' ),
      'add_new_item' =&gt; _x( 'Adicionar Propagandas', 'propaganda_item' ),
      'edit_item' =&gt; _x( 'Editar Propagandas', 'propaganda_item' ),
      'new_item' =&gt; _x( 'Nova Propagandas', 'propaganda_item' ),
      'view_item' =&gt; _x( 'Ver Propagandas', 'propaganda_item' ),
      'search_items' =&gt; _x( 'Procurar Propagandas', 'propaganda_item' ),
      'not_found' =&gt; _x( 'Nenhuma Propaganda encontrada', 'propaganda_item' ),
      'not_found_in_trash' =&gt; _x( 'Nenhuma Propaganda encontrada no lixo', 'propaganda_item' ),
      'parent_item_colon' =&gt; _x( 'Propagandas-pai:', 'propaganda_item' ),
      'menu_name' =&gt; _x( 'Propagandas', 'propaganda_item' ),
  );
  
  $args = array(
      'labels' =&gt; $labels,
      'hierarchical' =&gt; true,
      'description' =&gt; 'Propagandas por Cateoria',
      'supports' =&gt; array( 'title', 'editor', 'thumbnail'),
      'taxonomies' =&gt; array( 'genres' ),
      'public' =&gt; true,
      'show_ui' =&gt; true,
      'show_in_menu' =&gt; true,
      'menu_position' =&gt; 5,
      'menu_icon' =&gt; 'dashicons-images-alt2',
      'show_in_nav_menus' =&gt; true,
      'publicly_queryable' =&gt; true,
      'exclude_from_search' =&gt; false,
      'has_archive' =&gt; true,
      'query_var' =&gt; true,
      'can_export' =&gt; true,
      'rewrite' =&gt; true,
      'capability_type' =&gt; 'post'
  );
  
  register_post_type( 'propaganda_item', $args );
  }
  
  add_action( 'init', 'register_cpt_Propagandas' );
  
  
  function remove_menus(){
  
  
   remove_menu_page( 'edit-comments.php' );          //Comments    
  
  }
  add_action( 'admin_menu', 'remove_menus' );
  
  
  
  ?&gt;
  </code></pre>
  
  <p>Thanks in advance guys! =)</p>