Ready to get started?Download WordPress


Custom post(page) type, template dropdown gone. (2 posts)

  1. PHPanos
    Posted 2 years ago #

    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.

  2. claudia_kady
    Posted 2 years ago #

    Hi PHPanos, I have the same problem with the WP 3.3.1 .. when using the custom menu, under the page attributes I do see the parent and order, but not the template selector.. I'm using a blank theme and I wanted to edit a page after a template.. it seems like wordpress is not recognizing my template.. I still haven't figured it out..

Topic Closed

This topic has been closed to new replies.

About this Topic