SHARE
TWEET

Untitled

a guest Jun 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wpa_scripts() {
  2.  
  3.     wp_enqueue_script(
  4.         'wpa_script',
  5.         get_template_directory_uri() . '/js/custom.js',
  6.         array('jquery'),
  7.         false,
  8.         true
  9.     );
  10.     $script_data = array(
  11.         'image_path' => get_template_directory_uri() . '/images/'
  12.     );
  13.     wp_localize_script(
  14.         'wpa_script',
  15.         'wpa_data',
  16.         $script_data
  17.     );
  18. }
  19.  
  20.     add_action( 'wp_enqueue_scripts', 'wpa_scripts' );
  21.      
  22. $(function(){
  23.     jQuery(document).ready(function() {
  24.     $('#home').backstretch([
  25.        image_path+"home-bg-slideshow1.jpg",
  26.        image_path+"home-bg-slideshow2.jpg",
  27.        image_path+"home-bg-slideshow3.jpg",
  28.         ],  {duration: 2000, fade: 750});
  29.     });
  30.   })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top