I want to change the background in the landing page template

Community Forums Forums Design Tips and Tricks I want to change the background in the landing page template

This topic is: resolved

This topic contains 5 replies, has 3 voices, and was last updated by  braddalton 1 year, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #71785


    I am using the custom background feature in the Minimum Pro theme on my own website, which is in the development stage. The main background works very nicely for the front page, but I need a different background on my landing pages.

    Minimum Pro has a Javascript feature that resizes the background along with the page. I would like this feature on my landing pages, too. So my question is whether I can modify the landing page template to use a different background, or somehow trick or modify the Javascript to load a different background for any page that uses the landing page template.

    This appears to be the code in the template that calls the custom background:

    //* Enqueue Backstretch scripts
    add_action( 'wp_enqueue_scripts', 'minimum_enqueue_backstretch' );
    function minimum_enqueue_backstretch() {
    	//* Load scripts only if custom background is being used
    	if ( ! get_background_image() )
    	//* Load Backstretch scripts
    	wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
    	wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' );
    	wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );

    I’ve searched the forums, but I’ve found nothing that I am able to work with. I’m comfortable hacking PHP and Javascript, but I have no formal training. Thanks in advance for your help.

    • This topic was modified 2 years ago by  lflier.
    • This topic was modified 2 years ago by  lflier.


    I may have found the answer to my question in this plugin, which has the page behaving as I want:




    Here’s 3 ways to use backstretch. You can use it conditional if you install the plugin http://wpsites.net/web-design/3-ways-to-add-responsive-background-images-slideshows-in-genesis-using-backstretch/



    Awesome! Thank you.


    Noe Garcia

    Good Day,
    I have somewhat the same question, is it possible to have a background for different landing pages?
    Like if I set a feature image in that landing page to use that as a background.



    Yes. You can choose from a range of plugins or use conditional tags with the code to add a custom body class otherwise use the page i.d for each landing page.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.