I’ve been embedding JavaScript into my WordPress posts the hard way for ages. It means creating a separate file to define a function (that is the JS script) and then calling it into the post itself, as explained by the WordPress guys here.

Then, today, I discovered that there is actually a very easy way to integrate JavaScript into WP posts: using Andrew’s JavaScript in WordPress Posts Plugin.

You download the plugin, install and activate it the usual way – and… That’s it. JavaScript will start working in your posts.

According to some comments on Andrew’s blog it doesn’t work for everyone, but it worked a treat for me. The little things that make life so much easier. Thanks Andrew, you’re an absolute lifesaver!

– Geeky entry over –

Technorati Tags: , ,

Tagged with:
 

One Response to How to Embed JavaScript into WordPress Posts (The Easy Way)

  1. Vyan RH says:

    Thanks your information about javascript in wordpress. As we all know, in my free wordpress I can not use js to load alexa statistic. For those, best thanks for your help.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please leave these two fields as-is:
Set your Twitter account name in your settings to use the TwitterBar Section.