• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Using backstrech

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Using backstrech

This topic is: not resolved

Tagged: backstrech, outreach, stretch

  • This topic has 8 replies, 3 voices, and was last updated 10 years, 3 months ago by pauldewouters.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • December 30, 2012 at 11:06 am #8390
    iaditya999
    Member

    I am using outreach theme....

    Following briangardner.com for long time...Before some time he was with minimum theme but then he changed his blog theme to stretch theme (
    which is available on studiopress)

    In that theme he has used backstrech code for the background of the blog....

    Actually I was working with my inner section from style.css.....Changing only inner background from my theme using backstrech.....

    I have searched for it and found some scripts and code but I am unable to incorporate with it , where to add the code and what about css ????

    It would be great if someone explains it into detail so I can experiment in various parts of my web.....

     

    December 30, 2012 at 5:13 pm #8469
    cdils
    Participant

    Hi there,

    Can you post a link to your site so I can see what you currently have?

    Cheers,

    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    December 30, 2012 at 11:32 pm #8535
    iaditya999
    Member

    http://technoz.net/

     

    <a href="http://imgur.com/DFukh"><img src="http://i.imgur.com/DFukh.png" alt="" title="Hosted by imgur.com" /></a>

    http://i.imgur.com/9dUU3.png

     

    December 31, 2012 at 11:14 am #8606
    cdils
    Participant

    The Stretch theme is calling in the background stretch scripts from functions.php. The actual styling is taking place in stylesheet.css.

    What are the "scripts and code" you have found? Are they from the original Stretch theme?


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    December 31, 2012 at 11:30 am #8608
    iaditya999
    Member

    I founded here

    https://github.com/srobbin/jquery-backstretch ....

    What should I do to make it work as I said in the problem????

    December 31, 2012 at 6:09 pm #8646
    cdils
    Participant

    There's basically three components:

    Add the javascript files to your site.
    Call in those scripts via your site's functions.php
    Add in custom styling for your featured slider in stylesheet.css

    1. You'll need to download backstretch.js and include it with your theme files - upload it to wp-content/themes/minimum/js or wherever you want. There's an additional script used in Stretch called backstretch-set.js. Here's a link for that code: https://gist.github.com/4424049.

    2. From there you'll need to call those scripts in via your theme's function.php file. Here's an example of how it's being called in from the Stretch theme:

    /** Load Backstretch script and prepare images for loading */
    add_action( 'wp_enqueue_scripts', 'stretch_enqueue_scripts' );
    function stretch_enqueue_scripts() {
    wp_enqueue_script( 'stretch-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0', true );     

         wp_enqueue_script( 'stretch-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'stretch-backstretch' ), '1.0.0', true );
    }

    /** You'll need to customize this bit  below**/

    add_action( 'genesis_after_post', 'stretch_set_background_image' );
    function stretch_set_background_image() {

    $image = array( 'src' => has_post_thumbnail() ? genesis_get_image( array( 'format' => 'url' ) ) : genesis_get_option( 'stretch_default_image' ) );
    wp_localize_script( 'stretch-backstretch-set', 'BackStretchImg', $image );
    }

    Make sure the file path in the function above matches wherever you added backstretch.js and backstretch-set.js. There a function in the the Minimum theme's function.php called function minimum_featured_image() and that's where your featured slider is probably being called in (unless you've customized it a different way). You'll need to modify that function to mimic function stretch_set_background_image().

    3. Lastly, you'll need to apply some CSS to your theme's stylesheet.css for those divs containing your featured slider. Keep in mind the Stretch theme is using a static image versus a slider, so there will be some differences.


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    January 2, 2013 at 10:00 am #8947
    iaditya999
    Member

    i have been working for this two days since...But failing many times....

    $image = array( ‘src’ => has_post_thumbnail() ? genesis_get_image( array( ‘format’ => ‘url’ ) ) :

    here what to add between src ,format and url ???

     

    would you please rather provide more specific way related to outreach theme....

    January 2, 2013 at 10:55 am #8961
    cdils
    Participant

    Hi, I'm not sure where to go from here. Let me see if I can get someone to help.


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    January 2, 2013 at 1:32 pm #9006
    pauldewouters
    Member

    you can always use one of these:

    FREE

    http://wordpress.org/extend/plugins/wp-supersized/

     

    PREMIUM

    http://codecanyon.net/item/full-screen-background-images-pro/523811?ref=mordauk&ref=mordauk&clickthrough_id=101380379&redirect_back=true

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble