Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me

TOPIC: HTML and Javascript

HTML and Javascript 1 year 2 weeks ago #45635

  • Gavman
  • Gavman's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
Hello,

A mapping tool called Google Fusion requires me to copy and paste links to javascript files in the <head> </head> section of a website. Easy enough I guess but the <head> section of Wordpress sites often combines HTML with PHP and it is not all clear exactly where I can safely paste the links to javascript files.

Also, I need to amend the head section to put in <script> </script> tags and data.
These usually go in the <body> section but with google fusion, it must go in the head section.

Can you help? does such a process also require amending the PHP? or doesnt it matter?

thanks
Please become a member of OSTraining to reply to this post.

HTML and Javascript 1 year 2 weeks ago #45656

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
Hi Gavman,

You should be able to insert your script into the header.php file. If you're trying to insert it into index.php, you'll see that the first line is
get_header(); ?> which gets the header.php file and that has all the info for the header. There are some scripts, there, but the head tags are pretty clear and you should be able to insert what you need between the head tags.

Once you open header.php I think it will look familiar to you. Let me know if that answers the question.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

HTML and Javascript 1 year 1 week ago #45692

  • Nick
  • Nick's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 16807
  • Thank you received: 387
  • Karma: 56
Hi Gavin,

You can also use the "Header and Footer" plugin:
wordpress.org/extend/plugins/header-footer/

We hope these two suggestions help! Let us know if you have any questions.

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

HTML and Javascript 1 year 1 week ago #45751

  • Gavman
  • Gavman's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
thanks Nick and Ed
Please become a member of OSTraining to reply to this post.

HTML and Javascript 1 year 1 week ago #45777

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
You're welcome!

Ed
Please become a member of OSTraining to reply to this post.

Sign Up for OSTraining

Powered by Kunena Forum

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.