How to duplicate “Pages” section in the control panel?

This should fairly closely mimic “Pages”.

function gallery_type_custom_init() {
    $args = array( 
        'public' => true, 
        'label' => 'Gallery',
        'capability_type' => 'page',
        'hierarchical' => true,
        'supports' => array( 
               'title', 
               'editor', 
               'thumbnail', 
               'excerpt', 
               'page-attributes', 
               'custom-fields' 
      )
    );
    register_post_type( 'Gallery', $args );
}
add_action( 'init', 'gallery_type_custom_init' );

If you need this to use your custom page templates, though, it won’t work. That part is hard-coded for page post types only.

techhipbettruvabetnorabahisbahis forumuedueduseduseduedusedusedueduedusedus