Articles of custom background

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 not seem to be the case. Does anyone have experience doing this, or know what direction would be best to extend custom-background? Or would […]

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 WordPress, and I am wondering where I should place it and how. Can someone please give […]

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-admin. How can I specify it to a specific page ? Edit: I just checked im running 3.3.1. So my version […]

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 able to solve (and i run into these types of problems all the time naturally:). I have created […]

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%, height to whatever vh I want, and then set background to the image […]

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 background is completely white. I can un-comment this section in my css to make it work […]

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 admin section of the page itself, which is what I’d like to accomplish. Basically, the user […]

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 WordPress generating: body.custom-background { background-color: #ffffff; background-image: url(‘background.jpg’); background-repeat: no-repeat; background-position: top center; background-attachment: scroll; } I would like to customize WordPress in […]

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 experience for both backgrounds in terms of colour/image/select-repeat etc. Any Ideas?

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 want to make it for specific div eg. #featured-home-image. How? $args = array( ‘default-color’ => ‘000000’, ‘default-image’ => ‘%1$s/images/background.jpg’, ); add_theme_support( ‘custom-background’, $args );