1

Is it bad for performance to overwrite custom templates in the child theme?

For example: I have a template called single-music.php in my parent theme. I have put single-music.php in the child theme and have made custom changes there. Is this bad for performance or the incorrect way?

3

Actually, what you have described is the correct way to do things and there shouldn't be any noticeable impact on site speed and performance.

Using child themes also has the benefit of allowing your changes to persist through theme upgrades.

1

As already stated, the method you are using is the recommended way of doing it.

Wordpress is written in such a way that it will always look for a template in a child theme first if there is an active child theme before looking for a template in the parent theme.

So coming to performance, there is no impact on performance as these checks are performed anyway by default, so even if the child template does not exist, this check are run.

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.