can't set a default background for child themes
-
Hi
Could anyone provide me with information on how to create a default background/ background image for different themes. If I set a default background in the child themes css, users can’t change it in admin > appearance > background.
I currently don’t have a background set in my css and I’ve tried a few things such as-
$args = array( 'default-color' => '000000', 'default-image' => get_template_directory_uri() . '/images/background.jpg', ); add_theme_support( 'custom-background', $args ); $defaults = array( 'default-color' => '000000', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $defaults );
Doing this sets the color ready in appearance > background. but not ready on the front-end, the backgrounds only appear when you go to the background backend and click save. Can I get a background or image on the front end straight away by default, thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘can't set a default background for child themes’ is closed to new replies.