How to add a custom background to your theme

This is a quite simple job anyone can do. Many themes now support custom background under theme settings. If yours doesn’t support it, let’s add this support together.

WordPress allow users to change site background, but if your theme didn’t include this feature, then you won’t see Background link under Appearance tab. Here we will enable this feature using add_custom_background function.

First open functions.php under your theme folder and add the code below anywhere you like:

add_custom_background();

Now, save the file and upload it to your server.

Your theme will show that link under appearance section after you visit admin section. (Yeah, It’s that easy.)

After you upload an image there you will also see background alignment, repeat and scroll options to set it up exactly as you want. WordPress handles all the CSS code for you!

Enjoy!

NS Weight Release