• This plugin works out of the box, and does exactly what it says it will do.

    It has options for controlling the position of the image: repeat, horizontal position, vertical position, and fixed vs. scrolling. It even has the option for selecting a background color.

    What’s missing is the one feature I need, which is the option to scale the image to fill the entire page. I was able to remedy this with a single CSS statement, but it would be nice to do it with JS for greater browser compatibility.

    It’s a great plugin, nonetheless!

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s easy. Open inc/class-custom-backgrounds-filter.php

    Then, look for:

    /* Output the custom background style. */
    		echo "\n" . '<style type="text/css" id="custom-background-css">body.custom-background{ ' . trim( $style ) . ' }</style>' . "\n";

    And replace it by:

    /* Output the custom background style. */
    		echo "\n" . '<style type="text/css" id="custom-background-css">
    	body.custom-background{ ' . trim( $style ) . '
    	-webkit-background-size: cover;
    	-moz-background-size: cover;
    	-o-background-size: cover;
    	background-size: cover;}</style>' . "\n";

    Plugin Author Justin Tadlock

    (@greenshady)

    There are proper ways to extend plugins like this one using the core WP APIs. Any code changes directly to the plugin like the one above will be lost when the plugin is updated and is dangerous in the wrong hands.

    Also, the CSS code can be added directly to your theme’s style.css file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Works perfectly, but…’ is closed to new replies.