Title: Using Javascript, CSS in WordPress
Last modified: January 24, 2017

---

# Using Javascript, CSS in WordPress

 *  [mthant](https://wordpress.org/support/users/mthant/)
 * (@mthant)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-javascript-css-in-wordpress/)
 * Hello
    I am relatively new in WordPress, Javascript and CSS. I just want to have
   some interactive features. For example, using 2016 theme, I want to know where
   I can place CSS or Javascript files when I want to implement some interactive
   features. Text Editor in WordPress only allows HTML. Thanks, Myo

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-javascript-css-in-wordpress/#post-8690261)
 * useful codex:
    [https://codex.wordpress.org/Using_Javascript](https://codex.wordpress.org/Using_Javascript)
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-javascript-css-in-wordpress/#post-8690602)
 * Meh, I don’t care much for t-p’s link 😛 It’s totally correct as far as it goes,
   but doesn’t warn you about the risks of editing theme files or how to properly
   get external files loaded. For little snippets here and there, it’s probably 
   fine. For more serious efforts it falls short. IMHO of course.
 * If you add your JS and CSS to your twentysixteen files, your changes will likely
   be lost when the theme is updated. To protect your changes, you should create
   a [child theme](https://codex.wordpress.org/Child_Themes). Another alternative
   is to create a basic, simple [plugin](https://codex.wordpress.org/Writing_a_Plugin).
   Plugins are not quite as good as child themes for custom CSS because it’s more
   difficult to ensure your CSS is loaded after the theme’s unless you are targeting
   only one specific theme.
 * To ensure CSS and JS external files are loaded in the correct order, you should
   load them with [wp_enqueue_script()](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
   and [wp_enqueue_style()](https://developer.wordpress.org/reference/functions/wp_enqueue_style/).
   These functions give you the ability to specify dependencies. WP will then be
   sure dependencies are loaded first.
 *  Thread Starter [mthant](https://wordpress.org/support/users/mthant/)
 * (@mthant)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-javascript-css-in-wordpress/#post-8696802)
 * I am just thinking of creating some simple interaction like simple calculator.
   Can that be affected by WordPress updates?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-javascript-css-in-wordpress/#post-8699259)
 * It depends on where you put your code. If it resides on files that are subject
   to updates, then your code can be overwritten. If you alter core WP files (never
   do this!) then WP core updates can overwrite your work. It’s not a guarantee,
   not all files are updated each time. Sooner or later though…
 * If you alter or add to theme files and the theme is updated, then you could lose
   your work. If you alter or add to plugin files, when the plugin is updated, you
   could lose your work. Some themes have designated files that are meant for user
   customizations, such files when available should be safe.
 * To ensure your custom work is safe from updates, either create a child theme 
   or your own plugin. Either one is easy to do. It can then be the repository for
   all your custom work.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Using Javascript, CSS in WordPress’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/using-javascript-css-in-wordpress/#post-8699259)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
