Installation

1. Upload gecka-bgstretcher to the /wp-content/plugins/ directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress

Quick start

  • Go to wp-admin > Appearance > Background
  • Add a background image
  • Set position to center
  • Set repetition to no repeat
  • Set position to fixed
  • Add add_streched_background () function call to your theme’s function.php script

FAQ

  • You don’t have the Background sub-menu under Appearance ?
    That means that the theme you are using doesn’t support it. Simply add add_custom_background(); to your functions.php file or specify the image manually using the background parameter (see bellow). More info here and here.
  • You added the function call but the background doesn’t appear?
    It is important to know that, for this plugin to work you’ll need to wrap the whole content of your website into a DIV with the ID set to wrapper. You can use another ID but you’ll need to specify it when calling the add_streched_background() function (see bellow)

Advanced usage

For advanced usage, the add_streched_background () function accept a bunch of parameters:

background
The background image to show, or an array of background images as full url.
background_cb
A custom function callback witch has to return an array of background images as full urls.
shuffle
setting this parameter to yes will shuffle your backgrounds displaying them in a random order
pageWrapper
the css selector to the an element wrapping your whole page content. Default is #wrapper to fit the TwentyTen theme. It is important to know that some mandatory css code will be applied to it:

#wrapper {
z-index: 2;
position: relative;
}
imageContainer
bgStretcher will automatically build structure for the images list in a DOM tree. This parameter is ID for the images holder. Try inspecting the tree with a FireBug to get an idea how it’s constructed.
Default: ‘bgStretcher’
resizeProportionally
Indicates if background image(s) will be resized proportionally or not.
Default: ‘true’
resizeAnimate
Indicates if background image(s) will be resized with animation. (Be careful, this may slow down some PCs if your images are large.)
Default: ‘false’
imageWidth
Original image’s width.
Default: 1024
imageHeight
Original image’s height.
Default: 768
nextSlideDelay
Numeric value in milliseconds. The parameter sets delay until next slide should start.
Default: 3000 (3 seconds)
slideShowSpeed
Numeric value in milliseconds or jQuery string value (’fast’, ‘normal’, ’slow’). The parameter sets the speed of transition between images.
Default: normal
slideShow
Allows or disallows slideshow functionality.
Default: ‘true’

2 Comments to BgStretcher. Leave one.

  1. Pingback: Bgstretcher update | Gecka-apps

  2. Pingback: Travis Luong | Background Stretcher