title: How to include all custom post types instead of only Posts
body: <pre><code>$this-&gt;add_meta_box( 'select_post_template', __( 'Post Template', 'custom-post-templates' ), 'select_post_template', 'post', 'side', 'default' );
  </code></pre>
  
  <p>To make a plugin work with custom post types, I've been told to change "post" to the name of the custom post type. Does anyone know if I can make it work with <em>all</em> custom post types (including regular posts) by changing this line somehow?</p>
  
  <p>FYI, I found this at:
  <a href="http://wordpress.org/support/topic/custom-post-templates-with-custom-post-types-in-wp-30?replies=5#post-1679398" rel="nofollow noreferrer">http://wordpress.org/support/topic/custom-post-templates-with-custom-post-types-in-wp-30?replies=5#post-1679398</a></p>
  
  <p>And it's in reference to the Custom Post Template plugin:
  <a href="http://wordpress.org/extend/plugins/custom-post-template/" rel="nofollow noreferrer">http://wordpress.org/extend/plugins/custom-post-template/</a></p>
  
  <p>Thanks in advance!</p>
  
  <p>EDIT:</p>
  
  <p>I've tried:</p>
  
  <pre><code>$post_types = get_post_types(array("public" =&gt; true));
  foreach ($post_types as $post_type) {
    $this-&gt;add_meta_box("select_post_template", __("Post Template", "custom-post-templates"), "select_post_template", $post_type, "side", "default");
  }
  </code></pre>
  
  <p>But the custom post types still don't get the template selection menu. The posts do, just as they did with the original code. Thanks for suggestion... does anyone have another?</p>
  
  <p>Note: Conceptually, the approach is solid. If I create my own array with a list of my custom post types, this code does add the templating to them.</p>