• Resolved David Grand

    (@itsdavidgrand)


    Hi!
    I use Hueman child theme with Hueman 2.2.3 as parent theme, but when I copy alx-tabs.php from functions/widgets in my child theme (functions/widgets) and then I edit this copied file, nothing happens.

    Any solution to change these files without having to change it for each theme udpate ?

    Thx,

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi David. The widget is loaded using a function in the parent theme. You need to copy that function to your child theme functions.php file:

    function alx_load() {
      // Load theme languages
      load_theme_textdomain( 'hueman', get_template_directory().'/languages' );
    
      // Load theme options and meta boxes
      load_template( get_template_directory() . '/functions/theme-options.php' );
      load_template( get_template_directory() . '/functions/meta-boxes.php' );
    
      // Load custom widgets
      load_template( get_template_directory() . '/functions/widgets/alx-tabs.php' );
      load_template( get_template_directory() . '/functions/widgets/alx-video.php' );
      load_template( get_template_directory() . '/functions/widgets/alx-posts.php' );
    
      // Load custom shortcodes
      load_template( get_template_directory() . '/functions/shortcodes.php' );
    
      // Load dynamic styles
      load_template( get_template_directory() . '/functions/dynamic-styles.php' );
    
      // Load TGM plugin activation
      load_template( get_template_directory() . '/functions/class-tgm-plugin-activation.php' );
    }

    Then change this line:

    load_template( get_template_directory() . '/functions/widgets/alx-tabs.php' );

    to this to load the widget from your child theme:

    load_template( get_stylesheet_directory() . '/functions/widgets/alx-tabs.php' );

    More information in the theme documentation.

    Thread Starter David Grand

    (@itsdavidgrand)

    It works ! Thank you so much 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child Theme : function/widgets php file doesn't remplace original’ is closed to new replies.