Proper Way To Do A Child Theme Functions
-
In the parent theme:
function et_add_background_image(){ $bg = et_get_option( 'styleshop_bg_image' ); if ( '' == $bg ) $bg = get_template_directory_uri() . '/images/body-bg.jpg';
In the Child theme I am using:
if ( ! function_exists( 'et_add_background_image' ) ) { function et_add_background_image(){ $bg = et_get_option( 'styleshop_bg_image' ); if ( '' == $bg ) $bg = get_template_directory_uri() . '/images/new-body-bg';
But get “Fatal error: Cannot redeclare et_add_background_image() (previously declared in…”
What am I doing wrong there?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Proper Way To Do A Child Theme Functions’ is closed to new replies.