WordPress have done all the work for us in version 3.00, and have created new calls to getting the background settings, all we have to do is offer the option to our theme users, and we can do this in four lines, two function lines and two comment lines, so lets add support for the new background feature.
In part one we looked at creating a child theme for an existing Artisteer theme, in part two we added the changes in WordPress version 3 for menu functions, another nice little function is the new backgrounds, WordPress now has the ability to change the background and apply these changes from the admin panel, changin the background (body) image or color is now so very easy.
You can download the example Parent theme Here : Example 2.4 Theme (2427)
You can download the example Child theme part 2-3 Here: Artisteer Theme Upgrade Part 2-3 (1296)
If you have been following this series of tutorials you will have your child theme, open the file called functions.php, add these two lines
// This theme allows users to set a custom background add_custom_background();
Next open the header.php in the child themes folder, look for the body tag <body>, all you have to do is to replace this line!
<!-- Add Background Support --> <body <?php body_class(); ?>>
Well that is it you are finished editing the files lets have a look at the admin panel background page.
The preview panel updates when you save the changes.
Here is our theme with the changes to revert back just remove the image and delete the color
Note: we do require your feedback to improve our themes and tutorials, please leave your comments good or bad.
Code disclaimer information
This document contains programming examples therefore, www.DigitalRaindrops.net grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.
All sample code is provided by www.DigitalRaindrops.net for learning illustrative purposes only.
These examples have not been thoroughly tested under all conditions. www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, or function of these examples.
All programs contained herein are provided to you “AS IS” without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.
We hope you will benefit from our tutorials Membership to this website is not required, however the downloading of some themes and files is restricted to site supporters.
You can register for a 10 year ‘Free Supporters Account’ from the members page which will give you access to the source files and free themes, as we introduce premium themes and content some of these these will only be downloadable with a subscription, any revenue from subscriptions is used to support the site costs.
This website is a tool to support and promote WordPress and Artisteer, please support, share and give credit for any benefits you gain from the tutorials on this website.