Are custom inner theme folders in any way overridable by child themes?

It depends entirely on the parent theme. While WordPress will check the child theme for templates in the Template Hierarchy and use those if they are present, it’s up to theme authors to decide how much overwriting by child themes they want to support for any other files outside this hierarchy.

For example, when including template parts the theme author could use:

require 'partials/partial.php';

And this would work fine, but if the theme author wanted to support child theming they would use:

get_template_part( 'partials/partial' );

This is because get_template_part() will check the child theme for partials/partial.php and use that if it exists, otherwise it will fall back to the parent theme’s copy of partials/partial.php.

Since 4.7.0, WordPress has added several functions that allow theme authors to support child theming for other files.

get_theme_file_uri() will return a URL for a file in the child theme if it exists, otherwise it will use the parent themes’. This allows themes to support replacing CSS and JS files in child themes.

For example, if the parent theme enqueues a stylesheet like this:

wp_enqueue_style( 'custom-style', get_theme_file_uri( 'assets/custom.css' ) );

Then a child theme author can replace that stylesheet by just placing assets/custom.css in their child theme.

get_theme_file_path() will return the path for a file in the child theme if it exists, otherwise it will use the parent themes’. This can be used by parent themes to allow child themes to replace entire included PHP files.

For example, if the parent theme included a PHP file like this:

include get_theme_file_path( 'inc/template-tags.php' );

Then a child theme author could replace template-tags.php by just placing inc/template-tags.php in their child theme.

So the takeaway here is that WordPress does support child themes replacing arbitrary files from their parent theme, but the parent theme author needs to explicitly support it by using the correct functions.

Uncode is a paid theme, so I can’t see the code, but I suspect it’s not using get_template_part(), which is why you can’t replace the files in your child theme. Paid themes are often not good ‘WordPress citizens’ and have pretty spotty support for functionality like this.

Leave a Comment