This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Inserting a Javascript file into the Child Theme

  • Creator
  • #8719

    Is there a way to insert a javascript file into either the Child theme or the core Aleyska components?

    Thanks for the help.

Viewing 1 replies (of 1 total)
  • Author
  • #8724
    Jason Bobich


    To include a javascript file, you’ll want to use the standard WordPress enqueue system. Here’s how this works:

    Here’s an example of what you might do from your Child theme’s functions.php:

    function my_scripts_method() {
    		get_stylesheet_directory_uri() . '/assets/js/my_script.js'
    add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
Viewing 1 replies (of 1 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.