when child theme overwrites function from parent theme
-
Hi,
i bought a theme and to not destroy it, i created a child theme.
now i would like to overwrite some functions of the functions.php file of the parent theme.firstly i checked if the parent theme function includes a check before like:
if (!function_exists('my_function')) { ...
but nothing as such exists so i must firstly remove it and recreate it.
So i created a functions.php file in my child theme and tried to remove existing function to recreate it in my child theme as following:
remove_action('showTop' ); function showTop(){ ... } add_action( 'showTop' );
but it does not remove it from parent functions.php file.
any idea where is my mistake ?
thx
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘when child theme overwrites function from parent theme’ is closed to new replies.