I have a page "Portfolio", it contains a loop that outputs the list of portfolio (Custom Post Type, is this the problem?) items using page-portfolio.php. Problem is somehow WordPress used the archive.php to render my portfolio page, why is that?
|
|
|||
|
|
|
An archive of a custom post type is displayed using So in your case you should rename |
|||
|
|
|
I don't think it is possible to use portfolio.php for the Custom Post Type "Portfolio". The way I have solved it on a site I did recently was to call my Custom Post Type "Project" instead. Then pull the content in via a Page Template called portfolio.php (see Brady's answer). Then to show the single Projects, I use a template called single-project.php |
|||||
|
|
Make sure you have added the comment block to your Add this to the top of the file:
Go into pages in the admin area of WordPress and create a page and assign the above template to that page. |
|||
|
|