I have used the following code in functions.php and it seems to be working well –
add_theme_support(‘custom-background’, apply_filters(‘zerif_custom_background_args’, array(
‘default-color’ => ‘ffffff’,
‘default-image’ => get_stylesheet_directory_uri() . “/images/bg.jpg”,
‘wp-head-callback’ => ‘check_if_landing_page’
)));
function check_if_landing_page(){
if ( is_front_page() )
{
_custom_background_cb();
}
}