I've created a CPT named portfolio
. Now i want to create a page which will act as an INDEX for this CPT. Now i've two choices ....
a) Make a custom template having custom WP_Query. In this way i can assign this template to any page and that page will work as an index.
b) Make archive-portfolio.php
instead, which will act as an INDEX.
Now i've a few questions ...
1: Which is the correct approach?
2: If (a) then what is the actual usage of archive-cpt.php
page then?
3: If (b) is correct approach, is there any possibility to make this page available in wordpress menu manager by default and also in the drop down menu (located at Setting->Reading
) to use it as front page?
archive
template since it is clear what that template will be doing. On the otherhand, if have more of a page format that normal WordPress pages cannot handle or will take too much to customize ( think meta values, such as a members page ) then I would go with the cpt template.if post type -> get_template()
- I think this is better if you will not have asingle.php tempalte
.