Title: Creating new page with Javascript code
Last modified: July 28, 2021

---

# Creating new page with Javascript code

 *  [margmacd](https://wordpress.org/support/users/margmacd/)
 * (@margmacd)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/creating-new-page-with-javascript-code/)
 * Hello
 * I would be grateful to learn of good recommendations for plugins that would allow
   me to copy Javascript code over to my WordPress site in order to recreate a page
   that was originally constructed on a different type of platform using Javascript.
 * Many thanks in advance
    -  This topic was modified 4 years, 10 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/creating-new-page-with-javascript-code/#post-14711423)
 * There are a number of code snippet plugins. Some may be PHP focused only, but
   maybe there are some that support JS.
    [https://wordpress.org/plugins/search/code+snippet/](https://wordpress.org/plugins/search/code+snippet/)
 * TBH, getting JS code in an external file(s) loaded for a particular page isn’t
   all that complicated. A few lines of PHP code which could be added to your theme’s
   functions.php or a very simple custom plugin.
 * External JS files are enqueued with `wp_enqueue_script()`, called from a callback
   hooked to “wp_enqueue_scripts” action. Conditionally enqueue based on `get_queried_object_id()`
   returned value to target one specific page.
    [https://developer.wordpress.org/reference/functions/wp_enqueue_script/](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)

Viewing 1 replies (of 1 total)

The topic ‘Creating new page with Javascript code’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/creating-new-page-with-javascript-code/#post-14711423)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
