WordPress.org

Support

Support » How-To and Troubleshooting » register_post_type page-attributes missing

register_post_type page-attributes missing

  • In the following code you can see that I’m “supporting” page-attributes. However, the template dropdown doesn’t appear in the admin.

    The same issue is mentioned here: http://wordpress.org/support/topic/417055?replies=8

    Is this is an issue of registering the post type incorrectly or a bug?

    register_post_type( 'theme',
    		array(
    			'labels' => array(
    				'name' => 'Themes',
    				'singular_name' => 'Theme'
    			),
    			'menu_position' => 4,
    			'public' => true,
    			'query_var' => 'theme',
    			'rewrite' => array( 'slug' => 'themes', 'with_front' => false ),
    			'supports' => array( 'title', 'editor', 'excerpt', 'post-thumbnails',  'custom-fields', 'page-attributes',  'comments' ),
    			'register_meta_box_cb' => null,
    			'taxonomies' => array( 'category' )
    		)
    	);
Viewing 3 replies - 1 through 3 (of 3 total)
  • i have the same problem! i have searched and searched and couldn’t find an answer! can someone steer us in the right direction please?

    Thanks

    Are you sure you need it?

    Templates apply to pages really. Your custom post type already has a template, it’s called ‘single-whateveryourcustompostiscalled.php‘.

    Make sense?

    m.

    I need it if I want to be able to choose from two templates in the same post type.

    I can’t currently see how I could have custom posts and then to be able to choose between a green template and a blue template for those posts…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘register_post_type page-attributes missing’ is closed to new replies.