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

parent/child theme detection #5

Open
mikemcguire opened this issue Dec 27, 2017 · 1 comment
Open

parent/child theme detection #5

mikemcguire opened this issue Dec 27, 2017 · 1 comment
Assignees

Comments

@mikemcguire
Copy link
Contributor

Need detection to load templates from parent/child directories.

@lstanard lstanard self-assigned this Jan 16, 2018
@lstanard
Copy link
Contributor

@mikemcguire there's currently some logic in place to check for a child theme but it doesn't work correctly because THEME_CHILD_URI is set to the full URI via get_stylesheet_directory_uri(), which doesn't work with PHP's file_exists function. We can fix by using get_stylesheet_directory() instead, but it brings up another question.

This method checks if the /templates directory exists in the child theme, and if it does, uses that directory - so it's all or nothing. If a user wants to modify a single organism template they have to copy over the entire templates directory.

I think it would be better if we could look for each individual template in either the parent or child. I feel like that wouldn't be possible from within Nucleus, but would maybe need to happen within the parent theme somewhere. Thoughts?

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

No branches or pull requests

2 participants