Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Suggestion: Move template-parts inside page-templates #833

Closed
joshtipton28 opened this issue Jun 11, 2016 · 3 comments
Closed

Suggestion: Move template-parts inside page-templates #833

joshtipton28 opened this issue Jun 11, 2016 · 3 comments

Comments

@joshtipton28
Copy link

I love Foundationpress and it is most certainly the best thing since sliced bread, but it is always confusing trying to figure out which directory I'm trying to get to when creating templates. I use the page-templates directory a lot more than template-parts.

With good UX principles in mind, I feel like a user shouldn't have to make as much of a conscious decision which directory they need, it should be intuitive. My brain sees "template" on both directory names and I'm forced to concentrate on something that shouldn't have to. To me, it would be more intuitive to have one directory with all things related to templates, with the exception of anything that has to be in the root directory. Again, just a suggestion.

@wishe
Copy link

wishe commented Jun 19, 2016

I feel like the 2 directories are very different and should be used for 2 very different things. Use the "template-parts" directory like an include directory for various components you want to re use on multiple pages. And then pull them in using "get_template_part()".

The "page-templates" folder should be used for storing the templates you want to have the user able to select when creating new pages in wp-admin. You make them visible there by adding a "Template name:" string to the docblock of the file.

I dont really see any logical reason as to why you would want to merge these directories.

@Luciaisacomputer
Copy link
Contributor

These are meant to be separate, it isn't a WP coding standard, but a very common pattern in theme development. If anything renaming template-parts to simply be partials might not be a bad idea but there is definitely a huge distinction between the two and good enough reason to keep them separate.

@colin-marshall
Copy link
Collaborator

Agreed with @LukePettway and @wishe and I am going to close this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants