adsense

How to Place JavaScript Into WordPress Pages





1. Log on to your WordPress blog.
2. Click on 'Appearance' and 'Editor.'

3. Select 'Header' from the list of templates on the right.
4. Add your JavaScript code using the online editor. The 'Header' template is the template where you add JavaScript required in the
section of an HTML page. If the JavaScript code is contained in an external JavaScript file, you can use the following code:

Replace 'myjavascript.js' with the URL of your external JavaScript file.
5. Click on 'Update File.'
6. Select the 'Page' template on the right.
7. Type in the additional JavaScript code needed in the body of the 'Page' template. If you need to call a JavaScript function from the code set up in the header section, use the following syntax:
myjsfunction();

8. Click on 'Update File' to save your changes.

Comments

0 Responses to "How to Place JavaScript Into WordPress Pages"

Post a Comment

Popular Posts

About