Title: Adding javascript statement to clean yeti based
Last modified: August 22, 2016

---

# Adding javascript statement to clean yeti based

 *  [info.brandaware](https://wordpress.org/support/users/infobrandaware/)
 * (@infobrandaware)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/adding-javascript-statement-to-clean-yeti-based/)
 * Hello,
 * How can I add a header or footer javascript statement to Clean Yeti?
    I’m putting
   a sortable table on some of my pages, and I need to call a javascript to enable
   sorting.
 * Thanks,
 * Brian

Viewing 1 replies (of 1 total)

 *  Theme Author [Serene Themes](https://wordpress.org/support/users/rlafranchi/)
 * (@rlafranchi)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/adding-javascript-statement-to-clean-yeti-based/#post-5219312)
 * It’s a good idea to install a child theme if you haven’t done so already. Create
   a functions.php file in your child theme. The following assumes you have a script
   in the root of your childtheme directory named script.js:
 *     ```
       <?php
       // functions.php file
   
       function childtheme_add_script() {
         wp_enqueue_script('childtheme-script-js', get_stylesheet_directory_uri() . '/script.js', array(), 1.0.0, false);
       }
       add_action( 'wp_enqueue_scripts', 'childtheme_add_script' );
       ?>
       ```
   
 * The above adds the script to the header. Change the fifth argument from `false`
   to `true` to add the script to the footer. If the script depends on jquery, then
   change the third argument from `array()` to `array( 'jquery' )`
 * That should take care of it. Let me know if you have any issues.

Viewing 1 replies (of 1 total)

The topic ‘Adding javascript statement to clean yeti based’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/clean-yeti-basic/2.5.1/screenshot.
   png)
 * Clean Yeti Basic
 * [Support Threads](https://wordpress.org/support/theme/clean-yeti-basic/)
 * [Active Topics](https://wordpress.org/support/theme/clean-yeti-basic/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/clean-yeti-basic/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/clean-yeti-basic/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 1 reply
 * 2 participants
 * Last reply from: [Serene Themes](https://wordpress.org/support/users/rlafranchi/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/adding-javascript-statement-to-clean-yeti-based/#post-5219312)
 * Status: not resolved