How do I create custom post type that uses a page template? (2 posts)

  1. thiswayup
    Posted 5 years ago #

    Hey all

    Is it possible to create a custom post type of "page" than assign a template for all pages of these custom types? I wasnt sure if I can put in "page" as the capability_type.

    my code so far

    $args = array(
                'label' => __('Product landing'),
                'singular_label' => __('product'),
                'public' => true,
                'show_ui' => true,
                'capability_type' => 'post',
                'hierarchical' => false,
                'rewrite' => true,
                'supports' => array('title', 'editor', 'revisions')
        register_post_type( 'product' , $args );
  2. vtxyzzy
    Posted 5 years ago #

    I think that if you set 'hierarchical' => true, you will get what you want. The value of false creates a new type that acts like a post.

Topic Closed

This topic has been closed to new replies.

About this Topic