W3cubDocs

/WordPress

get_background_color(): string

Retrieves value for custom background color.

Return

string

Source

function get_background_color() {
	return get_theme_mod( 'background_color', get_theme_support( 'custom-background', 'default-color' ) );
}

Changelog

Version Description
3.0.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_background_color