Tagged: child theme, parent theme, updates
-
AuthorPosts
-
January 17, 2016 at 6:29 am #566741
Hi, Enfold expert,
can i do to add all my existing parent theme files to child theme…i am doing this because, if enfold update in future, then all my enfold customized files will safe in child theme.
But, i just to confirm from you, that can i add all files not only function.php file, but i will add all files in child-theme.
thanks and hope to see your reply.
January 17, 2016 at 2:00 pm #566788Hi Hafeez Ullah,
A child theme file will override any WordPress file like functions.php, header.php, single.php etc, but not theme specific files.
Regards,
RikardJanuary 17, 2016 at 2:31 pm #566799Hi, Rikard
For example i want to customize iconbox.php file which locate in parent theme in this was: Enfold/config-templatebuilder/avia-shortcodes/iconbox.php file
Now, if i want to add iconbox.php in child-theme to override the parent iconbox.php… then should i add only iconbox.php file in child-theme
or
with all nested folders like this way: Enfold/config-templatebuilder/avia-shortcodes/iconbox.phpplease let me know must this.
- This reply was modified 8 years, 8 months ago by hamzakhankhan.
January 19, 2016 at 9:04 am #567700Hey!
Inside the child theme I recommend to Only include the files which you want to edit in the parent theme. This way when you update the parent theme you get the new features and updates and still not lose any changes you made to that file in child theme.
In your case maintain the same folder structure and only add iconbox.php
Please refer to https://developer.wordpress.org/themes/advanced-topics/child-themes/ for more details.
Regards,
VinayJanuary 25, 2016 at 11:37 pm #571677Hi, Vinay
Its not working when only i add the file.php in child theme but nothing worked.
Real Example:
Enfold/framework/php/functions-set-avia-frontend.php
from above you see the funtions-set-avia-frontend.php which is nested in enfold/froamworkd/php folders right ?
now i customized only the unctions-set-avia-frontend.php and past it in child theme, but it does not work.
so, can i have to add the same folders too ?
like this: Enfold/framework/php/functions-set-avia-frontend.php
only the file i included does not work.
January 26, 2016 at 10:13 pm #572399Hi!
Sorry it’s not clear what you are trying to achieve?
The child theme is used only to override the main theme files and wordpress functions so that when the main theme updates all the changes made will not be lost. Please elaborate what are you trying to change and what you want to do with it so we can help you better.
Best regards,
VinayJanuary 26, 2016 at 10:34 pm #572409Listen directly my problem, what i am facing the issue with enfold child theme.
I add this file:> functions-set-avia-frontend.php in child theme, but it does not overwrite the parent theme file…means even adding it in child theme, the parent theme file work, not my customize ones which i add i child theme.
I also tried to add with the exact path in child theme, but still not working: like this: Enfold/framework/php/functions-set-avia-frontend.php
So, why it does not work. my site is: themezy.tk
January 26, 2016 at 11:28 pm #572427Hi!
That is happening beause the subfolder / framework can not be replaced.
Can you let us know which function you want to remake, so we can try fidn a way to make it work out?Cheers!
BasilisJanuary 27, 2016 at 12:07 pm #572777why it is not replacing, this is impossible in any wordpress theme…?
Ok lets come to the point, i am making this changes….in file functions-set-avia-frontend.php
but it should be done in child theme
if(is_child_theme()) { $child = "- - - - - - - - - - -\n"; $child .= "ChildTheme: ".$theme->get('Name')."\n"; $child .= "ChildTheme Version: ".$theme->get('Version')."\n"; $child .= "ChildTheme Installed: ".$theme->get('Template')."\n\n"; $theme = wp_get_theme( $theme->get('Template') ); }
to this form
if(is_child_theme()) { //$child = "- - - - - - - - - - -\n"; //$child .= "ChildTheme: ".$theme->get('Name')."\n"; //$child .= "ChildTheme Version: ".$theme->get('Version')."\n"; //$child .= "ChildTheme Installed: ".$theme->get('Template')."\n\n"; $theme = wp_get_theme( $theme->get('Template') ); }
Meas i want to remove that 4 lines, i make those lines as comments..i dont want it to display in source file.
so how to do that in child theme, how can i add the customize file or any other way to do in child theme.
January 27, 2016 at 6:44 pm #573150Hey!
Please add following code to Functions.php file of your child theme
function avia_remove_debug() { remove_action('wp_head','avia_debugging_info',1000); } add_action( 'init', 'avia_remove_debug');
To replace ALB elements on child theme, please see – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
Regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.