Using backstrech

Community Forums Forums General Discussion Using backstrech

This topic is: not resolved

This topic contains 8 replies, has 3 voices, and was last updated by  pauldewouters 1 year, 7 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #8390

    iaditya999
    Participant
    Post count: 21

    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…..

     

    #8469

    cdils
    Participant
    Post count: 420

    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 tweet @cdils.

    #8535

    iaditya999
    Participant
    Post count: 21

    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

     

    #8606

    cdils
    Participant
    Post count: 420

    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 tweet @cdils.

    #8608

    iaditya999
    Participant
    Post count: 21

    I founded here

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

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

    #8646

    cdils
    Participant
    Post count: 420

    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 tweet @cdils.

    #8947

    iaditya999
    Participant
    Post count: 21

    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….

    #8961

    cdils
    Participant
    Post count: 420

    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 tweet @cdils.

    #9006

    pauldewouters
    Participant
    Post count: 13
Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.