WordPress 3.0 Custom Background Support

In WordPress 3.0, it will have, additional to the Custom Header Image support, also a Custom Background Support. A first snapshot is in the current trunk. To use the functionality, the theme needs in functions.php this line:

add_custom_background();

After that, there is in your backend under Appearance the menu Custom Background available.

WordPress 3.0 Custom Background Step 1

After uploading an image, you have the option to activate “Tile the background” and delete the background image.

WordPress 3.0 Custom Background Support Step 2

Here the result with the new Theme Twenty Ten.

Theme Twenty Ten with Custom Background Support


Posted

in

by

Comments

38 responses to “WordPress 3.0 Custom Background Support”

  1. Ben Huson Avatar

    That’s handy. Would also be nice to have an option to align left, right or center if you uploaded a big image that you didn’t want to tile.

  2. Michael Avatar

    Ben: Yes, that would be nice.

  3. […] Via Tags: Ar, Arrière-plan, Arrière-plan WordPress, Background Image, Theme, WordPress, WP3.0 Partager cet article […]

  4. Warren Avatar

    Thats awesome, is there somewhere we can download WP 3.0?

  5. Michael Avatar

    @Warren: You can download the last revision from http://core.trac.wordpress.org/browser/trunk.

  6. […] новость спасибо wpengineer. Надеюсь, WordPress 3.0 будет весьма интересным и богатым на […]

  7. Carlos Avatar
    Carlos

    Oh, this is glorious!

  8. Ben Avatar

    I’m not that impressed to be honest. I stopped using the custom header uploader, and wrote my own. The custom header uploader constantly threw up errors for people, or just loaded a white screen, it was a support nightmare. Since creating my own version there’s been 0 support.

    Using my theme Elemental I could add a background uploader very quickly and easily.

  9. Theo Avatar

    Thank you for the useful information ! Keep up the good work

    Cheers

  10. Tomáš Kapler Avatar

    I do not understand – will this be a wordpress core function or theme function. Custom header is afaik default theme function, this seems like core function. It would be bad if i would have to define all design things on tons of places. I would prefer theme functions or just some core support with theme overiding.

  11. Michael Avatar

    Tomáš, its a core function. See wp-admin/custom-background.php

  12. Rinaldi Syahran Avatar

    nice custom background support in wordpress 3.0 make your work easier.

  13. Diane Bourque Avatar

    This will make it so much easier for many bloggers to update the background image of their blog. Up until now, they needed a web developper to do that. Now, they’ll be able to do it from their dashboard (after modification to functions.php). Sounds good. Keep up the good work.

  14. Kevin Avatar
    Kevin

    Ben,

    I agree 100% on the custom header uploader. I ended up creating my own. I went from lots of complaints to zero complaints and even some compliments.

  15. ANdre Foisy Avatar

    What a nice a cool feature even though several templates allow this, not all of them of course, that makes it easier to have a personalized BG 🙂

    Nice!

    Andre Foisy

  16. amit payasi Avatar

    Nice Post. I am waiting for 3.0.

  17. […] Cette fonction est reprise en détail par Justin Tadlock. Ensuite, WordPress 3.0 autorisera la personnalisation simplifiée des arrières-plans de nos sites directement dans l’administration, de la même manière que l’on peut […]

  18. Ade Avatar
    Ade

    Anybody know of a theme implementing custom backgrounds for wordpress.com hosted blogs?

  19. […] a couple of times, discussing all the cool new features in it (like author specific templates and background support) and what should and should not be in core, like multi site and multi domain […]

  20. Jeff Walden Avatar

    Further options beyond tiling worth adding: alignment (also noted in previous comments), resizing (in-browser where possible using CSS3’s background-size or vendor-specific versions, or perhaps using server-side image resizing as fallback, possibly with a user-visible caveat that this support is “experimental” and “may not work in all browsers” or somesuch), and attachment (or lack thereof) to the canvas via background-attachment.

  21. […] a couple of times, discussing all the cool new features in it (like author specific templates and background support) and what should and should not be in core, like multi site and multi domain […]

  22. Michael Oeser Avatar

    Is there any known reason why the custom background feature doesn´t work?. I tried it in a theme of mine and although the background panel is there in the backend the changes do not take effect in the frontend (theme).

    No matter if I just change a color or if I use an image. Nothing changes. It works with the TwentyTen but not with my own theme.

    Any thoughts?

  23. Govindji Patel Avatar

    I am using the default twenty ten theme and I try to upload a custom background image it tells me that image is uploaded yet I do not see the image like you have on this lesson.

    when I click on media library I see it there is there anything I need to do to use it other than adding
    add_custom_background(); in function.php

  24. Michael Avatar

    @Govindji: The background image does not exist.
    background-image: url("http://gbpcentral.com/files/2010/07/background1.png")

  25. Govindji Patel Avatar

    When I upload the image I see the page as is on this image

    http://gbpcentral.com/images/background.png

    if you notice at top says background image in bold but no image.

    If I click on remove image that goes away

  26. Michael Avatar

    @Govindji: the last thing, what you should try is to check the folder/file permissions. Maybe the webserver can’t read the file.

  27. Govindji Patel Avatar

    Thank you Michael for prompt reply

    What folder/file should I change permission on so that the background can be uploaded as is the folders are 755 and files are 644

  28. Michael Avatar

    We have here 666 for the files. Write and publish a little test post and insert a image in the post. If the image is shown, your file permissions are ok.

  29. Govindji Patel Avatar

    Thank you for your help Michael

    I found out why I was having problem and I am posting so that other visitors can do the same if they having the same problem

    I upgraded form 2.9.2 to 3.0 and they have changed the file to upload in 3.0 so you have to make a minor change htaccess file as follows to make it work

    need to modified htaccess file and change the path as below..

    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    because previously it was with RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    and if you are using WPMU 3.0 blog.php is no longer in use, so far everything is working fine for me.

    Govindji Patel

  30. wuzisname Avatar
    wuzisname

    nice info but for some reason it doesn’t work, word-press reports:
    Unable to create directory /home/sblain/public_html/wp-content/uploads/2010/07. Is its parent directory writable by the server?

  31. Andy Hawkins Avatar

    Hi

    I use the twenty ten theme with success. It is easy to modify, but some challenges came up during my process. I’ve changed the Header image (using Appearence/Header) and it occurs on all my pages so that’s ok until now. My new challenge is this: Is it possible to have one Header on my FrontPage (A Flash Header or Animated Gif) and another Header on all my other pages? I don’t find out how to do it because the Appearence/Header only gives me the solution to put a Header image that reflects to all pages.

    I hope anyone can give me a good solution with a brief description.

    /Andy

  32. StevieG Avatar

    I’m beginning to use twentyten and have added a background image. It works just great apart from the positioning. Is there a way to specify top/bottom as you can with left/right/center?

  33. Jason Avatar

    @Andy Hawkins,

    I think the Dynamic Headers plugin would be something you can use. It is not something i have used but it sounds like it would fit your needs perfectly.

    http://wordpress.org/extend/plugins/dynamic-headers/

    Or you could customise Page / Post Templates.

  34. Daniel Avatar
    Daniel

    I would like to see a bg function that allows bg to be changed on schedule, so that the bg image could be scheduled to change according to time of day or season. If anyone has any ideas how to do this please let me know…

  35. […] WordPress 3.0 wurde die Möglichkeit im Theme geschaffen, dass der User einfach ein Hintergrundbild hochladen und nutzen können. Das Bild wird mittels CSS im Hintergrund positioniert. Damit ist es […]

  36. TekxY Avatar

    Nice, the Custom Background Support was one of the first things i noticed when i dled this theme.

    Btw I just made a traslation of Twenty Ten to spanish, the traditional way, I’ll leave you the link in case some of your readers can benefit from using it.

    http://geektual.com/tema-twenty-ten-para-wordpress-traducido-al-espanol/

  37. Thomas Avatar
    Thomas

    Hi

    Is there any way I can make the are wish in the example abowe is white (where the text is) transparent?