Title: adding custom code
Last modified: August 19, 2016

---

# adding custom code

 *  [akebe](https://wordpress.org/support/users/akebe/)
 * (@akebe)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/adding-custom-code/)
 * Hi,
 * Our organization recently migrated to Word Press, and I am trying to re-integrate
   some javascript code that creates pop-up layers, based on the some script from
   Dynamic Drive ([http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm](http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm)).
 * An example of working code exists from the archived site at [http://www.cultureplacehealth.org/nr/yimby/map.htm](http://www.cultureplacehealth.org/nr/yimby/map.htm).
 * My question is: how can I access the Head section of the template? Can you point
   me somewhere? I am new to your platform, and just need to fix one page. Also,
   is there a code editor that does not add 
    and <p> tags? I’m having an awful 
   lot of trouble cutting and pasting HTML code at this point.
 * Thanks

Viewing 1 replies (of 1 total)

 *  [Michael Fields](https://wordpress.org/support/users/mfields/)
 * (@mfields)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/adding-custom-code/#post-1065146)
 * I got a 404 on that link. A simple solution would be to add the following code
   to you theme’s functions.php file:
 *     ```
       add_action( 'wp_head', 'print_my_script' );
       function print_my_script() {
         if( is_page( 14 ) ) {
           print '<script type="text/javascript"></script>';
         }
       }
       ```
   
 * you will want to change 14 to the page ID of the page that needs the script included.

Viewing 1 replies (of 1 total)

The topic ‘adding custom code’ is closed to new replies.

## Tags

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

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael Fields](https://wordpress.org/support/users/mfields/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/adding-custom-code/#post-1065146)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
