mark-up
Member
Posted 5 months ago #
Hello everybody! :-)
I've some bad trouble with templates for custom post types:
I'd like to list the contents of my custom post type called 'projects' with a special template 'archive-projects.php' (I think that's the correct name?) but the content is always deployed by the index.php-template (not even the archive.php):-(
Is there some global setting for this? What can be problem?
BTW: The single-templates work fine (for example single-projects.php)!
Thank you for your time and help!
Mark
'archive-projects.php' (I think that's the correct name?)
Yes it is if you registered your custom post type as "projects" with register post type
http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display
Have you tried:
- deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).
Did you register your post type with: 'has_archive' => 'true';
mark-up
Member
Posted 5 months ago #
Hey keesiemeijer,
'has_archive' => true
was the solution. You'r my hero of the day!
Thank you so much! :)
Mark
No problem. Glad you got it resolved.