1
votes

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.

1

1 Answers

0
votes

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 the content-[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 (assuming content-movies.php is already present):

<?php get_template_part( 'content', 'movies' ); ?>

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