• Hi, I can’t seem to find the way of overriding the widget files in inc/widgets/class_something_widget.php.

    I’ve created a child theme and copied the whole theme content in it, but when I edit the widgets’ files in my child theme, nothing happens.

    sincerely yours.

    Paul

Viewing 1 replies (of 1 total)
  • Hi @paulmaudrydev,

    Child themes are allowed to override templates, not simply arbitrary PHP files. And about your query of editing the widget files, wrap widget class in the parent theme by if ( ! class_exists( class_name ) ) { } and now you can edit the widget code when you include it in the functions.php file in child theme.

    Thanks and Regards,
    Milan

Viewing 1 replies (of 1 total)
  • The topic ‘Overriding widget files in a child theme’ is closed to new replies.