Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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.

    #566788

    Hi 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,
    Rikard

    #566799

    Hi, 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.php

    please let me know must this.

    • This reply was modified 8 years, 8 months ago by hamzakhankhan.
    #567700

    Hey!

    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,
    Vinay

    #571677

    Hi, 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.

    #572399

    Hi!

    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,
    Vinay

    #572409

    Listen 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

    #572427

    Hi!

    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!
    Basilis

    #572777

    why 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.

    #573150

    Hey!

    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

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.