I use the Avada theme, and I have created a child theme (Customweb) for it.
I tried to override the file:
wp-content/themes/Avada/includes/lib/inc/templates/featured-image-first.php
And I try create that file in at:
wp-content/themes/Customweb/includes/lib/inc/templates/featured-image-first.php
But it doesn’t work.
Thank you for your help.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Child themes let you override templates loaded via WordPress’ template loading mechanism, e.g. get_template_part or the main theme templates such as index.php and single.php.
But they can’t be used to replace arbitrary PHP files or assets.
If a theme loads a template file using require or include, WordPress cannot intercept this and replace it with a child theme version.
If this is the case, then you will need to find an alternative method to achieve your goal. Check with the themes documentation, the author may have provided a method to do this, such as an option or filter, or you may need to fork the theme.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0