Title: Loading Scripts on specific pages
Last modified: August 19, 2016

---

# Loading Scripts on specific pages

 *  Resolved [dorich](https://wordpress.org/support/users/dorich/)
 * (@dorich)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/loading-scripts-on-specific-pages/)
 * In child theme I created a functions.php file that loads scripts and style files,
   the code is below.
    The section that loads libraries and scripts to all pages
   other than admin, in other words the first two functions, works as expected. 
   However, the third function, which is designed to load a script for a specific
   page does not load. It appears that my problem has to do with specifying the 
   page condition. The rest of the code for register and enqueue works if it is 
   placed in the general function that loads scripts for any page other than admin
   pages. I’ve researched this can can’t find any examples showing why the approach
   I’ve used is not working. I’ve swapped the page id with the name of the page 
   but to no avail.
 * Any suggestion on the source of the problem would be much appreciated.
 * Thanks.
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Note for the sake of brevity I removed the src’s but these have been validated
   and are not the source of the problem.

Viewing 1 replies (of 1 total)

 *  Thread Starter [dorich](https://wordpress.org/support/users/dorich/)
 * (@dorich)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/loading-scripts-on-specific-pages/#post-1891200)
 * [The code is here](http://wordpress.pastebin.com/3RQs5LGP)
 * Is “init” the appropriate hook to use for this activity?
 * Thanks.

Viewing 1 replies (of 1 total)

The topic ‘Loading Scripts on specific pages’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [dorich](https://wordpress.org/support/users/dorich/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/loading-scripts-on-specific-pages/#post-1891200)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
