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?