• Resolved bloooooop

    (@bloooooop)


    Hi,

    Here is my issue, I want to apply differents page templates to a custom post type but I can’t see the template’s list in admin.

    My code below :

    add_action( 'init', 'create_post_type' );
    function create_post_type() {
      register_post_type( 'landing',
        array(
          'labels' => array(
            'name' => __( 'Landing' ),
            'singular_name' => __( 'Landing' )
          ),
          'menu_icon'       => get_template_directory_uri().'/img/landing/news.png',
          'public'          => true,
          'rewrite'         => array('slug'=>'landing'),
          'capability_type' => 'post',
          'hierarchical'    => true,
          'has_archive'     => false,
          'supports'        => array( 'title', 'editor', 'thumbnail', 'excerpt', 'page-attributes')
        )
      );
    }

    In page attributes, I have order and parent but not template. I really don’t understand what I miss. Have you got some explanation ?

    Thanks for your help,
    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Get template list for a custom post type’ is closed to new replies.