How To Add JavaScript To Your Wordpress Post/Page Dynamically

by  $ivateja (223) on December 6, 2011   |   Leave a Comment | 334 views


You can add JavaScript to your wordpress sites by adding the the code in header.php, i mean by modifying our theme files.  But think what if you want to add the JavaScript to particular post or page of your wordpress site,  by default wordpress is not supporting this feature.  Actually we can add JavaScript in HTML mode but it will always scrambled, like…

Hear problem is, you can see the output by switching into visual but it will shows blank again if you came to HTML mode.

So to avoid this problem we have one superb plugin in wordpress :-) Custom fields shortcode. So let us see how to use this plugin.

  • Download the plugin and install the plugin in your wordpress blog
  • Then switch to HTML mode, in the Custom fields window, give the Name as js and add you own javascript in Value

That’s it, now your JavaScript will works fine, enjoy ;)


You May Also Like



Get Updates:
Enter your email :
     
    For getting updates directly to your mobile inbox Click Here



Speak Your Mind

Tell us what you're thinking, If you want a pic to show with your comment, go get a gravatar !






Search:


strPro Plus WP Theme [$71.36]

Buy this Highly adsense Optimised
Wordpress Theme - Increase Your
Adsnese Income Up To 200%



Contact us: strkgroups@gmail.com
Contributers:

» sivateja
» Jaswanth

[ Total of 309 posts by Feb 23, 2012 ]

wordpress visitors