This is what I would do:
- Create a functions.php within your Child Theme.
- Open the functions.php and paste this in:
<?php
/**
* A safe way of adding javascripts to a WordPress generated page.
*/
if (!is_admin())
add_action('wp_enqueue_scripts', 'responsive_child_js');
if (!function_exists('responsive_child_js')) {
function responsive_child_js () {
// JavaScript at the bottom for fast page loading.
wp_enqueue_script('custom-scripts', get_stylesheet_directory_uri() . '/js/custom-scripts.js', array('jquery'), '1.0.0', true);
wp_enqueue_script('custom-plugins', get_stylesheet_directory_uri() . '/js/custom-plugins.js', array('jquery'), '1.0.0', true);
}
}
?>
- Save functions.php with newly pasted function.
- Create a folder within your Child Theme and name it /js/ which would look something like this: /responsive-child-theme/js/
- Create custom-scripts.js and custom-plugins.js and include that in your /js/
- Add your JS in scripts and if there's a snippet from any of them, just pop that in plugins.
- Last step is to upload this to your server and you're done.
I know that this looks pretty big, but it just looks that way that's all.
And just because we're awesome, here's all this done for you in Child Theme form: http://themeid.com/public/responsive-with-js.zip
Enjoy!
Emil
elitewildlifesolutions wrote:I want to use it for a testimonial scroll, sans the bloated nature of a plugin. I love how clean and elegant it is.
The other reason I like it is I can easily put a box around the quote with a background gradient via CSS instead of a picture like .png or .jpg that a lot of plugins use.
All I need to know is where to put what.