Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  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. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement