Title: Help putting Javascript in page
Last modified: August 31, 2016

---

# Help putting Javascript in page

 *  [ahermon](https://wordpress.org/support/users/ahermon/)
 * (@ahermon)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-putting-javascript-in-page/)
 * Hello,
    I am doing some volunteer work for a non-profit. I am not an expert by
   any means. I have a non-wordpress page with javascript that I need to convert
   to work in a wordpress page. Any fairly detailed instructions would be appreciated.
 *     ```
       <!DOCTYPE html>
       <html class="html"><head>
       <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
       <meta name="generator" content="7.3.5.244"><title>Give to Hope</title>
   
       <!-- Other scripts -->
       <script type="text/javascript">
       document.documentElement.className += ' js';
       </script>
       </head>
       <body>
       <div class="shadow clearfix" id="page">
       <div id="cpb6a6797723" style="margin: 10px 0pt;" onclick="document.getElementById('pay_now_form_f0842ddb20').submit()">
       <div>
       <form action="https://globalgatewaye4.firstdata.com/pay" id="pay_now_form_f0842ddb20" method="post"><input name="x_login" value="WSP-HOPE-Egm9@xxxxx" type="hidden"><input name="x_show_form" value="PAYMENT_FORM" type="hidden"><input name="x_fp_sequence" value="140561766910534xxxxx" type="hidden"><input name="x_fp_hash" value="PNB-1.0-d44cdf92c09d5060ca295f276ab9c6187c3xxxxx" type="hidden"><input name="x_amount" value="" type="hidden"><input name="x_currency_code" value="USD" type="hidden"><input name="x_test_request" value="FALSE" type="hidden"><input name="x_relay_response" value="" type="hidden"><input name="donation_prompt" value="Please enter the amount you wish to donate" type="hidden"><input name="button_code" value="Donate Now Hope Church" type="hidden">
       <div class="cpwrap"><button type="button">Donate
       Now</button></div>
       </form>
       </div>
       </div>
       &nbsp;
       <script type="text/javascript">if (document.location.protocol != 'https:') document.write('\x3Cscript src="http://musecdn.businesscatalyst.com/scripts/4.0/jquery-1.8.3.min.js" type="text/javascript">\x3C/script>');
       </script>
       <script type="text/javascript">
       window.jQuery || document.write('\x3Cscript src="scripts/jquery-1.8.3.min.js" type="text/javascript">\x3C/script>');
       </script></div>
       </body></html>
       ```
   

Viewing 1 replies (of 1 total)

 *  [Jay](https://wordpress.org/support/users/phyrax/)
 * (@phyrax)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-putting-javascript-in-page/#post-6935011)
 * Strip out the `html`, `head`, `meta` and `body` tags ( opening and closing ).
   You can drop the script tag as well that’s calling up javascript ( its at the
   bottom ).
 * That’ll leave you with bare bones HTML content, now you need to add the header/
   footer calls and name the template, so this barebones should do ( not counting
   your HTML ):
 *     ```
       <?php
   
       /**
        * Template Name: My Template
        */
   
       get_header();
   
       ?>
       	<!-- Insert your HTML content immediately after this line -->
       <?php
   
       get_footer();
       ```
   
 * Now, once that’s done save that file and drop it in your theme, name it something
   like `page-my-template.php`
 * Once you do that go create a new page in WordPress and set the template to `My
   Template` – it should be in a dropdown on the right, if you did all this right.
 * Boom, done! – This is a crude, and very simplistic explanation of page templates,
   if you get hung up, take a read at the [official documentation on Page templates](https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/).
 * You will undoubtedly need to clean up styling, etc, and there are MANY other 
   ways of doing this ( considering you’re only doing a form ), but it should get
   you on the right track.
 * Good luck – happy coding!

Viewing 1 replies (of 1 total)

The topic ‘Help putting Javascript in page’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jay](https://wordpress.org/support/users/phyrax/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/help-putting-javascript-in-page/#post-6935011)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
