• I need to create content type identical to ‘page type’

    My code is:

    register_post_type(‘test’, array(
    ‘labels’ => array(
    ‘name’ => ‘Tests’,
    ‘name_admin_bar’ => _x(‘Test’, ‘add new on admin bar’),
    ),
    ‘public’ => true,
    ‘publicly_queryable’ => false,
    ‘capability_type’ => ‘page’,
    ‘map_meta_cap’ => true,
    ‘hierarchical’ => true,
    ‘rewrite’ => false,
    ‘query_var’ => false,
    ‘supports’ => array(‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘page-attributes’, ‘custom-fields’, ‘comments’, ‘revisions’),
    ));

    Unfortunately I can’t get ‘page template’ option on page attributes admin box. Why is that ? Is it reserved only for built in pages ? Or maybe I’m doing it wrong ?

  • The topic ‘Custom Post Type – a Page clone’ is closed to new replies.