SHARE
TWEET

functions.php

a guest Dec 23rd, 2012 159 Never
  1. <?php
  2.     /**
  3.      * A safe way of adding javascripts to a WordPress generated page.
  4.      */
  5.     if (!is_admin())
  6.         add_action('wp_enqueue_scripts', 'responsive_child_js');
  7.  
  8.     if (!function_exists('responsive_child_js')) {
  9.  
  10.         function responsive_child_js () {
  11.                         // JavaScript at the bottom for fast page loading.
  12.                         wp_enqueue_script('custom-scripts', get_stylesheet_directory_uri() . '/js/custom-scripts.js', array('jquery'), '1.0.0', true);
  13.             wp_enqueue_script('custom-plugins', get_stylesheet_directory_uri() . '/js/custom-scripts.js', array('jquery'), '1.0.0', true);
  14.         }
  15.  
  16.     }
  17. ?>
RAW Paste Data
Top