Support » Themes and Templates » set default background image repeat in multisite child theme

  • I have searched and searched for a solution to my problem. I need a way to set the default behavior for the default background image to repeat-x not repeat, or tile, both x and y. Below is my function, but the repeat does not work. I also tried adding this to my child style.css, but since this is a default wordpress thing, it is ignored. i think I have to set this in my child theme’s functions.php. The following sets the default background color, and image for the child theme, and I need to set the default to repeat-x, but that doesn’t work. My parent theme is twentytwelve. TIA.

    function facultywebsites_custom_background() {
    	add_theme_support( 'custom-background', array(
    		'default-color' => '043d5f',
    		'default-image' => get_stylesheet_directory_uri() . '/images/bg-master-fade.png',
    		'repeat' => 'repeat-x',
    	) );
    add_action( 'after_setup_theme', 'facultywebsites_custom_background' );
  • The topic ‘set default background image repeat in multisite child theme’ is closed to new replies.