Custom background for the index page only?

You can check in your callback function if you are an the front page. Sample code for the theme’s functions.php: add_action( ‘after_setup_theme’, ‘wpse_67480_theme_setup’ ); function wpse_67480_theme_setup() { $bg_options = array ( ‘wp-head-callback’ => ‘wpse_67480_background_frontend’, ‘default-color’ => ‘f0f0f0’, ‘default-image’ => ”, ); add_theme_support( ‘custom-background’, $bg_options ); add_theme_support( ‘custom-header’, array ( ‘width’ => 960, ‘height’ => 200, … Read more

How to insert a clickable and fixed background [duplicate]

Add div after body tag and apply below style. Your site start working. <div class=”fixedHeader”></div> <style type=”text/css”> .fixedHeader{ position: fixed; height: 80px; background: white url(http://www.affiliago.it/accounts/default1/banners/SKIN_BAKECA.jpg) no-repeat no-repeat center top; width: 100%; z-index: 1000; top: 0; } </style>

Custom Background: Can’t Set Color Default

You have to pass the $defaults as the second parameter to add_theme_support() per the Codex $defaults = array( ‘default-color’ => ‘000000’, ‘default-image’ => ”, ‘wp-head-callback’ => ‘_custom_background_cb’, ‘admin-head-callback’ => ”, ‘admin-preview-callback’ => ” ); add_theme_support( ‘custom-background’, $defaults);

default custom background image not saved in database when creating a new site

I assume you mean “get_theme_mod(‘background_image’) returns false” before I “save it once to activate it” If that is the case, get_theme_mod accepts a default parameter. Check the Codex: $name (string) (required) Theme modification name. Default: None $default (boolean|string) (optional) Default: false Pass your default image as the second parameter to that function and you should … Read more

Create a body div using CSS [closed]

Easiest Solution would be to create a new css rule that simply changes the background color of an element to white i.e: .white-background{ background-color: #ffffff; } Then just add class=”white-background” to the elements you want to have a white background. Just remember an HTML element can have multiple classes inside a single class=”” attribute just … Read more