Community Forums › Forums › Archived Forums › Design Tips and Tricks › I want to change the background in the landing page template
Tagged: background, landing page, minimum pro, template
- This topic has 5 replies, 3 voices, and was last updated 11 years, 8 months ago by
Brad Dalton.
-
AuthorPosts
-
November 8, 2013 at 3:39 pm #71785
lflier
MemberI 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() ) return; //* 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.
November 8, 2013 at 7:44 pm #71808lflier
MemberI may have found the answer to my question in this plugin, which has the page behaving as I want:
November 8, 2013 at 9:41 pm #71815Brad Dalton
ParticipantHere'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/
November 12, 2013 at 9:03 am #72466lflier
MemberAwesome! Thank you.
February 23, 2014 at 11:55 am #92029Noe Garcia
MemberGood 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.February 23, 2014 at 7:34 pm #92063Brad Dalton
ParticipantYes. 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.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.