Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feedback Wanted] Directory structure question #171

Closed
thefrosty opened this issue Mar 1, 2016 · 11 comments
Closed

[Feedback Wanted] Directory structure question #171

thefrosty opened this issue Mar 1, 2016 · 11 comments

Comments

@thefrosty
Copy link

Just curious why your /functions/ are located in your /assets/ directory? Shouldn't they be in an /includes/ directory?

Edit from @JeremyEnglert - should the functions be moved from assets/functions to an includes/ directory? This seems to be how many themes have it setup.

@JeremyEnglert
Copy link
Owner

Some themes use /includes/ others use /assets/, some even use /library/. Unless there is some kind of standard I missed? (Which is likely).

To me, "assets" makes the most sense as they are pieces of code that belong to the theme.

@thefrosty
Copy link
Author

Thanks.

To me assets is more CSS, JS, Images. But just wanted to ask the question.

@JeremyEnglert
Copy link
Owner

That's actually a great point. Definitely something to think about - especially since many themes seem to take that route.

@thefrosty
Copy link
Author

Just dropping my 2 cents for what it's worth.

@JeremyEnglert
Copy link
Owner

I'd love for WP to have some kind of standards/best practices when it came to file structure.

@JeremyEnglert JeremyEnglert changed the title Directory structure question [Feedback Wanted] Directory structure question Mar 2, 2016
@JeremyEnglert
Copy link
Owner

Made some changes to the original post to get feedback from more users. 👍

@mrscharf
Copy link
Contributor

mrscharf commented Mar 2, 2016

I've always thought of includes to indicate server side and assets to indicate front end. Since the functions file uses include() to call up the functions files, it would probably make more sense for them to be in an includes directory.

@anyway
Copy link

anyway commented Mar 2, 2016

I'm also slightly irritated that the functions folder is located under assets. I would leave the name "functions", because of the relationship to functions.php, and would place the folder directly into the theme root.

@iamchaka
Copy link

iamchaka commented Mar 3, 2016

I'm still a pup learning WP, but when I worked with another CMS and it was set up just as @mrscharf stated. Is there any other files that would benefit from this? Also are you thinking having the includes folder on the same directory level as parts, assets, etc?

@JeremyEnglert
Copy link
Owner

@iamchaka - correct! If this change were to happen, the includes directory would be in the root of the theme.

@JeremyEnglert
Copy link
Owner

This change will happen in the next update.

#185

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

No branches or pull requests

5 participants