Support » Fixing WordPress » Adding html with javascript in a post

Viewing 1 replies (of 1 total)
  • Hello,

    I’ll do my best to help you out. You can put your javascript in a separate file and call it in the post like this (be sure to use HTML view in the editor):

    <script src="http://www.yourdomain.com/wp-content/themes/yourtheme/myfile.js" type="text/javascript"></script>

    Alternatively, you can create a page template and include the code above or below the loop. In this case the result will always appear above or below your content but it’s a much more flexible way to include javascript. For more information on creating page templates go here:

    http://codex.wordpress.org/Pages#Page_Templates

    Cheers,
    David

Viewing 1 replies (of 1 total)
  • The topic ‘Adding html with javascript in a post’ is closed to new replies.