Skip to content

Instantly share code, notes, and snippets.

@Coopeh
Created February 28, 2013 02:16
Show Gist options
  • Save Coopeh/5053641 to your computer and use it in GitHub Desktop.
Save Coopeh/5053641 to your computer and use it in GitHub Desktop.
ESI included php file for loading the header images via jQuery
<?php require_once('/var/www/wordpress/wp-load.php'); ?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('header.top-head').css('background-image', 'url(<?php header_image(); ?>)');
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment