Questions tagged [custom-background]

The custom background is a WP feature that gives special support to backgrounds on the body tag. To use this feature it must be activated in the theme.

Filter by
Sorted by
Tagged with
8
votes
2answers
41k views

featured image as background image on pages

I'm adding a featured image on my page through the dashboard and I want to use it as a background image on the container div of the page. I want to apply the background image through css, so I am ...
8
votes
2answers
1k views

How do I add settings to the Background Options Page?

I am developing a theme and I wanted to add some extra content to the built in background options page. I know how to use the settings API to create new theme options and settings but I can't seem to ...
4
votes
1answer
2k views

Add custom background to div in home page

I want to have featured image on specific div on home page that could be changed in customizer. I saw in documentation custom background for body(https://codex.wordpress.org/Custom_Backgrounds) But I ...
4
votes
1answer
11k views

Change background color with a dominant from picture

Im looking for a smart way to change the background color for a page, but taking the #xxxxxx value from the dominant color of the headline picture. In twenty eleven theme, I can set a random image ...
4
votes
1answer
572 views

How to get attachment id of background image?

I'm looking for a way to get the ID of the background_image when I am using custom headers? I tired using url_to_postid like this: $url = get_header_image() $postid = url_to_postid( $url ); and ...
4
votes
1answer
2k views

How WP_Customize_Background_Image_Control is supposed to work?

I'm trying to add a second background image function to my theme customizer with this code. // HTML Background Image $wp_customize->add_setting( 'html_background_image', array( ...
3
votes
2answers
141 views

Display custom_background outside wp_head()

My theme is a very small one page theme which really doesn't need all the scripts, so I've created a few options to remove wp_head() and wp_footer() so the user can choose if they want to enable or ...
3
votes
2answers
984 views

Multiple Custom_Background, is it possible?

Is it possible to create multiple "custom background" administration pages? A site I'm doing now needs 2 different background in 2 different areas, I would really love giving my client the same ...
2
votes
2answers
2k views

Custom background for the index page only?

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-...
2
votes
1answer
766 views

Is this possible to attach the background image to a div instead of body?

Currently, adding a custom background image via WordPress will attach it to the <body>. Is there a hook to tell WordPress to attach the background image to another element? Instead of having ...
2
votes
1answer
2k views

Custom Background-Image not showing up

I have added theme_support for my background-image and its showing up in the admin where I can set it and from there it looks as it should, but if i go to my website outside of the admin the ...
2
votes
3answers
1k views

How to add background image control to page admin controls?

I understand that each page is assigned its own class such as .page-id-22 & I can use that to assign a background image to it using the stylesheet but I've seen a theme that adds a control to the ...
2
votes
2answers
12k views

How to customize a divs background dynamically using Advanced Custom Fields Plugin?

I've gotten as far as creating custom post types, custom fields and linking those to templates on this first time WordPress project i'm working on, but i seem to have run into a problem i'm not easily ...
1
vote
2answers
80 views

Weekly background code not working

I have this code I want to implement onto my website. I have successfully set up a child theme. This code is suppose to change the background every day of the week. I am not all too familiar with ...
1
vote
2answers
562 views

Implementing “Random” to custom-background

I have a client site that requires a random background image. I figured that custom-background would have something similar to custom-header for randomizing which image is selected, but alas it does ...
1
vote
1answer
4k views

How to remove custom background?

I'm using WordPress 3.5.1 and twentyten. I want to remove the support for custom background. I found this text: http://codex.wordpress.org/Function_Reference/remove_custom_background but i'm a ...
1
vote
1answer
427 views

Rotating background images with admin options

I recently saw an admin panel that had options to set background images for a page. The option was found on from clicking pages and then a "main page". Under the description was a form that allowed ...
1
vote
0answers
41 views

Add Custom Background Properties to Customizer

I've just added a second background image upload with the intent of using in the footer: $wp_customize->add_setting( 'tcx_background_image', array( 'default' => '', 'transport' =...
1
vote
0answers
440 views

Custom Background not Appearing

I have a very simple theme to which I need to add custom-background support. When I go into appearance -> customize, I am able to select a background image. However, the background of the site ...
1
vote
3answers
2k views

How to handle a background-size: cover image in Wordpress?

Designer new to wordpress here. I want to take the featured image on a post and make it a hero image for the post single page. The way I would normally do this is to create a div, set width to 100%, ...
1
vote
1answer
897 views

Background image not appearing

I'm trying to add a custom background on a child theme. In the child theme's functions.php, I add add_theme_support( 'custom-background'); and the background option appears under the "Appearance" menu ...
0
votes
2answers
764 views

Custom header tiling?

I've been playing with the wp custom header and background options. I like the way you can tile a small image for the background, and looking for a way to add that option to the custom header image ...
0
votes
1answer
67 views

Using featured img as div background

I have a full width/height header div that I want to use the featured image in, but I'm having trouble getting the div to load a default image if no featured image is set in a blog post. I figured I ...
0
votes
1answer
295 views

Different background images on different sites [closed]

I use wordpress 4.0.5 and Minamaze Theme (https://wordpress.org/themes/minamaze) The Minamaze Theme gives me the opportunity to add custom CSS, without having to edit any files, so I added: body, #...
0
votes
3answers
1k views

Change background color of subpages

I have several pages, which are ordered like this: Home Projects - Project 1 -- Project 1 Subpage 1 -- Project 1 Subpage 2 - Project 2 -- ... And I want to change the background color (in this case ...
0
votes
2answers
4k views

I can't change the body background-color through style.css

Using a child of Twenty Twelve, I've been adding color to all the major containers (#main, #content, #secondary, etc.) using #arbitrary-id { background-color: #dedede; } This works for everything ...
0
votes
2answers
51 views

Is there any way to register custom background images like header images?

I wonder if there exists a quick way to register custom background images as simple as we do with the custom headers. $header_images = array( 'ferrari' => array( 'url' => ...
0
votes
1answer
3k views

HowTo: develop WP template with dynamic background image

Is there a way to develop a WP template which, amongst others, sets the background image of a certain element dynamically by choice from admin backend? Think of an page editor who simply picks an ...
0
votes
1answer
278 views

Add custom background to section in home page

To be clear : in Wordpress there is an option to change the body backgroung-image. I want to modify this option to permit to change the background-image of a particular section (named #section1) and ...
0
votes
1answer
20 views

Blank/White on certain parts of pages

I am volunteering and helping with the website and for some reason, I cannot get the whites on certain pages to go black: http://www.remnant13.com/ How do I make it so that the white parts are all ...
0
votes
1answer
104 views

How to use WP Theme Option: Custom_Backgrounds on specific element?

I want to use the WP Theme option Custom_Backgrounds on a specific div. By default it adds it to the body and I dont see a way of changing this. Does anyone know how?
0
votes
1answer
859 views

override a css style [closed]

I have the following line in the original theme style.css file: background: none repeat scroll 0px 0px #CCC; In my child-theme.. I want to delete the "background: line.. But how? Update: OK to ...
0
votes
2answers
487 views

Change the background of each post according to the category

I am using the Hueman Theme. What I want to do is that the background of all the posts should change according to the category of the post. Please suggest something
0
votes
1answer
2k views

Custom Background default color not changing

I need to set several default states for a theme's background. The idea is that the background changes upon choosing a color scheme. Everything is working and changing EXCEPT the background color. The ...
0
votes
1answer
111 views

Random sidebar/widget background

Does anyone have a clever idea to get a random/changing background for just the widget sidebar?
0
votes
2answers
31k views

Change background image per page

I would like to have a different background image as per PAGE (category) When the user goes to the home.php, call it A, it shall have a background image, then if I send them to a page B, I would like ...
0
votes
1answer
123 views

Restrict size of custom background image

Is it possible to restrict the size of the custom background image? I recently released a theme and I notice that people are uploading very large images to use as background image which of course ...
0
votes
1answer
1k views

How to change the background color of my header dynamically based on a Custom Posts types color value?

I've been able to figure out how to include the custom field i'm referencing within an inline style within a div that wraps my header. The problem is that it's in my header and so when a particular ...
0
votes
1answer
1k views

Random home page background images with caption text

all. I am developing a Wordpress theme and I need to have a random background image display on the home page with specific text for each image. I have installed the Background Manager plugin (http://...
0
votes
1answer
541 views

Get background color for Live Preview with Theme Customization API?

This could very well be a stupid question, but I'm working on a WordPress theme (check the link to see what I'm talking about, then read on)... You'll see the Post Formats icons are surrounded by a ...
0
votes
2answers
2k views

Display background color or image with custom meta box?

With custom meta boxes, how would I go about displaying the background image (or color if no image is linked) within the page. Code for the page where I want data to displayed. I want to apply the ...
0
votes
1answer
398 views

Post to inherit custom category background image from parent

I have a custom field on a category where you can add an image. I have it as a background image to show on the category's archive page, like so: archives.php <body style="background:url('<?php ...
0
votes
1answer
17 views

Change background image page header overlay for each category

this is my site: http://styleofchamp.com/ and I'm trying to change the background image page header overlay for each category. I have been looking at many forums but I didn't get with the correct ...
0
votes
0answers
31 views

Ho to display author image dynamically as a background image?

On my puzzle website I would like to display author image on the post area as shown in the image below. The author image would be a background image. May I know how is this possible? Theme is using ...
0
votes
1answer
26 views

Add border/background color/color text of embedded pop-up [closed]

I have been trying in vain to give color to my subscription pop-up. I believe it must be something quite easy and straight-forward but, since I do not understand a thing about html, I really need your ...
0
votes
0answers
33 views

Fetch customizer image and output as an inline css style background image

So I have a feeling this is quite simple, but Im a bone head since I'm still learning PHP as I hack away at themes via my own child-theming... In short, I've built a customizer section in my ...
0
votes
0answers
16 views

Setting multiple videos for the video background

Is there any way to include a video background that takes multiple self-hosted videos and play them one by one? Most of the plugins can play only one video for the background.
0
votes
1answer
62 views

Custom Background for each page and post

I've created a custom background metabox and was able to call it on multiple post types and posts. I have 2 issues need your help please. Is it possible to include also custom taxonomies and post ...
0
votes
1answer
373 views

Placing a background image with text over it

I'd like to place an image of a blueprint behind a section of text. Things I'm worried about: Image will be tiled Image will stretch weird Image will look bad on different screen resolutions What's ...
0
votes
1answer
68 views

Setting up Custom Background [closed]

I’m currently working on a website for educational purposes. I want all of my pages look like this one. As the background on the sides are made from image but the background for content is grey. I ...