WordPress.org

Ready to get started?Download WordPress

Forums

register_post_type page-attributes missing (4 posts)

  1. Patrick Daly
    Member
    Posted 3 years ago #

    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' )
    		)
    	);
  2. mxpimp47
    Member
    Posted 3 years ago #

    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

  3. madhavaji
    Member
    Posted 3 years ago #

    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.

  4. jsims281
    Member
    Posted 3 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.