I’m writing a child theme and need to modify part of the parents theme’s core functions.
To do this I would normally create a new class / function with the same name but the theme that I am using doesnt make use of the
if (function_exists('function_name'))
or
if (class_exists('class_name'))
What other options do I have to override this parent theme without me needed to modify the parent theme.
Thanks
I think you can find a complete guide for overriding or functions that are created in parent theme functions file with prioriry and other things…. A Guide to Overclass files riding Parent Theme Functions in Your Child Theme
i think if you add same name of class or function then it take from child theme function and class then it take from parent.
For ex.
Child Theme
Parent Theme
Same for class