Custom post(page) type, template dropdown gone.
-
Hello.
Similar problems has been posted before, but most times it’s been about a custom post type. I haven’t find any solution, googling very much for a solution where I got nowhere. So now I’m looking for your help to find a solution to my problem.The problem:
I have my custom post type (acting like a page) where the template dropdown in the admin is not visible. I have a custom template file with this comment on top, and I have made custom template files before:/* Template Name: family-page */
And I am using these arguments + function to create the custom post type:
add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type('familjer', array( 'label' => __('Familjer'), 'singular_label' => __('Familjer'), 'public' => true, 'show_ui' => true, // UI in admin panel '_builtin' => false, // It's a custom post type, not built in! '_edit_link' => 'post.php?post=%d', 'capability_type' => 'page', 'menu_order' => true, 'hierarchical' => true, 'rewrite' => array("slug" => "%author%"), // Permalinks format 'supports' => array('title', 'excerpt', 'editor', 'thumbnail', 'page-attributes'), 'menu_position' => 4 )); }
Any clue on what could be wrong? I do see the order and the parent dropdown in the page-attributes sidebar, but not the template dropdown. It works as expected on the regular “Pages” menu, but not in my custom menu, in this case “Familjer”.
Thanks in advance.
- The topic ‘Custom post(page) type, template dropdown gone.’ is closed to new replies.