Is it possible and how should it be done? My custom post appears and works fine, and i can customize its permalink page but the index page stays the same. I tried making a content-[posttype].php + single-[posttype].php along with amending the get_templatepart code for the single-[posttype].php filebut it didn’t have any affect on the appearance of the custom post type when viewd in the main index feed.
Leave a Reply
You must be logged in to post a comment.
If you want to customise the Custom Post Type’s archive page then you will need to also create a template called
archive-[posttype].php
, and in this, call thecontent-[posttype].php
template part that you have already created.For example if your Post Type is ‘movies’ then you would create
archive-movies.php
and in it call this (assumingcontent-movies.php
is already present):An invaluable reference when working out which template files to use for what is the ‘Official’ WordPress Template Hierarchy page in the codex: http://codex.wordpress.org/Template_Hierarchy