The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Use Featured Image for backstretch.js

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #45624

    I’m using [backstretch.js]( “”) for full-width header images on my pages. I’m able to grab the Featured Image url like this:

    ID), ‘full’, false, ”); echo $src[0]; ?>

    Does anyone know of a way to pass this url to my main.js file?

    $(“.cover”).backstretch(“FEATURED_IMG_URL_WOULD_GO_HERE”); // backstretch.js

    Thinking it might be possible to store the PHP in a variable, though I’m not so sure.

    Thanks in advance. Any help is appreciated!

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.