Hi! I'm Andy and I make rather nice websites!
  • Aston Villa - International Players - Interview Piece
    Aston Villa Interview Piece - More details->

    Design Javascript Social Network Integration

  • Incremental Music
    Incremental Music - More details->

    Logo Design Bespoke Wordpress Design & Development Mailing List Media Player E-Commerce

  • Find My Tradesman
    Find My Tradesman - More details->

    Theme Redesign Bespoke Wordpress Development Geolocation functionality Bespoke Logo

  • The Animal Farm
    The Animal Farm - More details->

    Web Design Wordpress Development Theme Options Bespoke Widgets

  • Esteban
    Esteban Music - More details->

    Web Design Wordpress Development Social Network Integration Data Capture Facebook Widget

  • The Navy Training Corps
    The Navy Training Corps - More details->

    Web Design Wordpress Development Online Shop Unit Locator Admin Section

  • Lisa Charrington Wilden
    Lisa Charrington-Wilden - More details->

    Web Design Wordpress Development Bespoke "Custom Fields" Functionality Javascript Photo Gallery

  • Blog Friends
    Blog Friends - More details->

    Web Design Wordpress Multi User External Blog Aggregation Social Networking Functionality

WordPress 3.0 – Easy custom backgrounds for theme developers

I have recently had a client ask me to implement functionality to allow them to change the main background image and background color. My first reaction was to try to persuade them that it was a bad idea for reasons x, y and z but really what I was worried about was them ruining my beautiful bespoke theme with their own images and garish backgrounds. (as it happens, this particular client is one of the best i’ve had and is super helpful and involved but nonetheless its still a risk!)

I conceded that if thats what they would like then thats what they will get! As my wife pointed out – “It’s their website Andy”. And she’s right. The whole reason I specialise in WordPress development is it’s ease of use for both developer and client.

So I started to write some theme options to give them this functionality and realised that WordPress 3 could do this! I have yet to install 3 for any other clients as I have yet to test the bespoke plugins I have written for many of them. I was brave and pressed the upgrade button. All is good. Nothing broke!

Anyway, the crux of it is this. To allow your users to upload their own background images, choose the position of them, choose their tiling and their scrolling and change the background color here’s what you need to put in functions.php-

add_custom_background();

Yes that’s it! I know! Try it out. You’ll love it.








No Comments Yet

You can be the first to comment!

Leave a comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>