3

I am using Storefront theme (But question isn't specify to this theme, I am asking question for any theme).

I can easily override files like header.php, footer.php using child theme(just copy and paste the file).

But I can't override any files which is on "inc" folder (any folder). How can I override those files?

4

WordPress only looks for the default template files while loading the child theme. So does woocommerce.

Any extra folder or file that exists in your parent theme can not be overridden, unless the developer is using actions and filters that allows you to hook into them. Therefore, a simple require() or include() can't be overridden by a child theme.

What you can do is to track the template file that is calling the files from the inc folder, and then override those in your theme's folder. You might need to go as back as functions.php.

For a complete list of default template files, take a look at the template hierarchy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.