Use a Default Theme Background for WordPress Theme Options

Home/Wordpress tricks/Use a Default Theme Background for WordPress Theme Options

Use a Default Theme Background for WordPress Theme Options

You can add theme support for background image. If user does not choose an image, a default image will be set as theme background image. Use this code in functions.php


add_theme_support( 'custom-background', array(
	'default-image' => get_template_directory_uri() . '/images/default-background.png',
) );

Yumna Tatheer

Yamna Tatheer is a WordPress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

More Posts

Follow Me:
Facebook

About the Author:

Yamna Tatheer is a Wordpress Plugin developer and a Top-Rated Upwork professional. She is a part-time blogger from Lahore and loves to write about wordpress and freelance industry.

Leave A Comment

WhatsApp chat