title: Select template menu for custom post types?
body: <p>I have created a couple of custom post types in wordpress, and have set hierarchical to true so it behaves as a page. </p>
  
  <p>The problem is, templates selection isn't available. I've applied <a href="http://wordpress.org/support/topic/page-template-dropdown-for-post-types-other-than-page" rel="nofollow">this hack</a> to get the menu to appear:</p>
  
  <blockquote>
    <p>there is a file meta-boxes.php within
    wp-admin\includes of the wordpress
    installation.. line 547 of the file,
    which is the function
    page_attributes_meta_box() just add
    the check for your particular post
    type name to be able to display the
    template pages drop down. </p>
  
  <pre><code>if ( ('page' == $post-&gt;post_type  || 'yourcustomposttype' == $post-&gt;post_type) &amp;&amp; 0 != count( get_page_templates() ) ) {
          $template = !empty($post-&gt;page_template) ? $post-&gt;page_template : false;
          ?&gt;
  </code></pre>
  </blockquote>
  
  <p>This successfully makes the menu appear, but the data won't save. The "parent" section saves but the "template" doesn't.</p>
  
  <p>Does anyone have any ideas?</p>