• Is there a way to pull an image url from a query, and have that url echoed into a plugin script that’s in the footer? My problem is that I have a layerslider that needs a static background image. The problem is that the query is ran at the top of the page, so I lose access to the loop by the time the javascript is called in the footer.

    I essentially need this:

    <script type="text/javascript">
         //Layer Slider
    	$(document).ready(function(){
    	$('#layerslider').layerSlider({
    	globalBGImage: '<?php echo $imagefromloopurlhere; ?>'
        });
    });
    </script>

  • The topic ‘Featured Image URL added into footer script’ is closed to new replies.