I am stuck at add_custom_background
.
I can change background color/image but I only want to change my index page. Currently, the changes apply on the whole page.
I want to make the changes from WP-admin.
How can I specify it to a specific page ?
Edit:
I just checked im running 3.3.1. So my version is not supported to use add_theme_support( ‘custom-background’ );
instead I want to use add_custom_background.
if ( is_front_page() )
{
add_custom_background();
}
Cant get it to work.
You can check in your callback function if you are an the front page.
Sample code for the themeâs
functions.php
:You can use the body class and define your background in your style.css
Example:
background for frontpage:
and so on.
Just check your source code for the body class of the site you want to address.
If your background is for another element but body you can add the body class in front of it: