- This topic has 6 replies, 3 voices, and was last updated 7 years, 10 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I've several custom post types and I like to put the corresponding templates (single and archive) into a sub-folder.
How can I do that?
Thank you advance for your input.
Unfortunately that article doesn't deal with putting the template files into a separate folder unless I missed that part.
Since Version 3.4, WordPress has provided a function to allow you to place page templates in a page-templates directory instead of the theme root. There's no way, as far as I know, that you can have templates in multiple sub-directories unless you can find a plugin that can help you.
do you remember what that function is and how to use it? I just like to have a sub-dir /templates and have all custom page templates like archive-testimonials.php and single-testimonials.php in there?
that works for regular page templates but not CPT single- and archive-templates?!
© 2023 WPEngine, Inc.