0

I am working on a new wordpress portfolio website, one of the features using jquery.backstretch.js

I have been able to create the successful code using the following, which includes the direct url to the image:

<script>
    $(".feature").backstretch("http://www.matthewgideon.com/wp-content/uploads/2014/02/test.jpg", {
        fade: 1500
    });
</script>

I would like to pull the url from a meta box, but my coding does not appear to work. This is what I tried:

<script>
    $(".feature").backstretch("<?php echo get_post_meta( $post->ID, '_cd_custom_url', true ); ?>", {
        fade: 1500
    });
</script>

Any suggestions?

Dhaval Marthak
  • 17,246
  • 6
  • 46
  • 68
mwgideon
  • 57
  • 2
  • 11
  • or the other option I wanted to try was pulling the wordpress page's "featured" image into the backstretch coding – mwgideon Feb 19 '14 at 17:00
  • fixed the issue - had nothing to do with the coding I was trying, I was missing the following code after the navigation: – mwgideon Feb 20 '14 at 04:06
  • in the end the following work fine: – mwgideon Feb 20 '14 at 04:12

0 Answers0