Note: As WordPress continues to make major changes to their API, I have lost interest in maintaining this plugin. There are currently a lot of compatibility issues that need to be resolved. If you are interestd in updating this code or even taking over this project please feel free, by contacting me at email@example.com. I no longer support this plugin.
Keep your site looking fresh with changing backgrounds!
Show a random background image every visitor session (using a cookie), page refresh, or timed slideshow interval. Choose between fixed full screen background, full width scrolling background, or classic non-scaled backgrounds. Supports background fade effects and optionally integrates with NextGen Gallery plugin. Replaces the built-in WordPress Background settings page.
Makes having cool backgrounds easy.
- Randomly change the background images – once per visitor session (using a cookie), once per page refresh or continuously using a slideshow-like timer.
- 3 Layout options – “Better” “Classic” and “Developer” – with many options
- Optionally scales your background to fit the user’s exact monitor size.
- Allows for random backgrounds to repeat/tile
- Optionally fade in and/or fade out the background dynamically using jQuery.
- Pre-loads next image in slideshows option to reduce flickering & lag.
- Upload background images using the NextGen Gallery plugin (must install first) or manually through FTP uploads
- Cross-Browser Tested with WordPress’ default Twenty Ten 1.3 and Twenty Eleven 1.3 themes. Passes W3C Validation.
- Works with most custom themes
- Allows for custom integration with DOM object names and function calls.
- Internationalized to Spanish, French, Portuguese and Chinese
When the fade in or out options are enabled the background will not appear until the image is fully loaded in browser to improve the effect appearance. If you want to have the background to load sooner there are instruction on this plugin’s homepage on how to set that up manually.
The developer mode allows you to have a randomly changing div, span, etc on any element. Simply provide the class or id name and it will add the background-image for you. There is also an optional function to insert the random image into the html anywhere on the page.
When changing background image every visitor session, a temporary cookie is made so that the chosen background image remains the same for the entire visit of the user on your site. The next time they visit your site, and once the browser cookie has expired, a new image will be randomly chosen. This is usually every 6 hours, but may vary due to various reasons.
- Chinese (thanks Jie)
- Brazilian Portuguese (thanks Raphael Suzuki)
- Translate for us!
I no longer support this plugin. Email me only if you are interested in submitting fixes or taking over the plugin, at: firstname.lastname@example.org
- Install and activate through your WordPress’ Admin plugins page.
- Go to WordPress Admin->Appearance->Better Backgrounds
- Do what the page says to do.
Kabam! You’ve got better backgrounds.
Contributors & Developers
“Better Backgrounds” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
1.0.0 – April 19 2011
- Started project as “Random Background Image Per Session”
1.0.1 – April 27 2011
- Tweaked documentation
1.1.0 – May 3 2011
- Added the BG height and disable session persistence options on the settings page. Improved instructions and durability
- Tweaked documentation
1.2.1 – May 20 2011
- Added fixed background support
- Re-vamped settings page and step by step instructions
- Added optional jQuery fade-in (thanks Dubois)
- Added multi-lingual support (thanks Dubois)
- Added integration with NextGen Gallery (thanks Dubois)
- Translated to French (thanks Dubois)
- Removed custom class option – you can just use “.bg-rand” or “#bg-rand” in your style sheet
2.0.0 – May 27 2011
- Changed plugin name to “Better Backgrounds”
- Added third “Basic Unstretched Centered Image, Scrolling” layout
- Fixed session start header error
- Added slideshow feature to allow background to change using js
- Re-organized settings page
- Added background color setting
2.0.1 – May 29 2011
- Fixed several core bugs
2.0.2 – May 31 2011
- NextGen Gallery drop down bug fix
- “Full Page Width & Custom Height, Scrolling” – background height fix
- Documentation update
3.0.0 – June 18 2011
- Redesign of admin options page
- Plugin setup to now completely replace WordPress’ standard ‘Custom Background’ feature
- Combined the ‘fixed’ and ‘full width and scrolling’ options and renamed to ‘Better Background’
- Renamed ‘Basic’ background to ‘Classic’
- Added position and repeat options to ‘Classic’ layout
- Added a Developer layout option to allow more customized API-like usages
- Added ability for developers to specify what DOM object to apply the background image
- Made the plugin’s settings specific to each theme you choose
- Optimized the random image selection and array sorting
- Added alt tags to ‘Better’ layout mode images for W3C validation
- Added nonce field for increased admin security
3.0.1 – June 18th 2011
- Fixed Fade-In checkbox bug
- Fixed Developer layout mode bug
- Added fade effect timer speed customization
3.0.2 – June 18th 2011
- SVN Problems
3.0.3 – June 22nd 2011
- Bug fix: classic background – image always positioned to the left
- Bug fix: get_background_color() removed for WordPress versions < 3.0.0
- Changed fade-in effect to first wait for image to fully load before showing
3.0.4 – August 4th 2011
- Bug fix: developer mode with fade effect with change interval of every page refresh
- Bug fix: IE <9 does not support console.log, forgot to remove after development
3.0.5 – September 25th 2011
- Bug fix: plugin can break when switching between various layout modes in certain order
- Added French translation
- Updated Spanish translation
3.0.6 – October 14th, 2011
- Bug fix: removed all variable & depreciation warnings when WP_DEBUG is true
- Disabled the check for settings upgrade because this update has been out for over 4 months
3.0.7 – February 19th, 2012
- Added new fade out effect!
- Added Chinease language (thanks to Jie!)
- Added Brazilian Portuguese language (thanks Raphael Suzuki!)
- Removed depreciated add_contextual_help function for WordPress 3.3
- Moved depreciated wp_enqueue_script call method for WordPress 3.3
- Fixed Opera jQuery.load() bug – slideshow instantly starts now in Opera
- Preview Window
- Add links to backgrounds
- Support for non-NextGen Gallery upload system
- Choose images per category
- Admin settings validation
- Developer mode: allow for tags with .src
- Developer mode: check if id/class name is given
- Optional full length image urls for CDN services
- Choose image based on page