here are many ways to insert javascript to your wordpress blog. First, adding javascript to the wordpress theme file.
It’s simple, you can use theme editor to edit you theme file. Go to Presentation - Theme Editor and then edit your files. You can edit them if you have enough permission (make sure file permission is 666 or 777). Add your javascript code everywhere you want and you need and then save your files.
Second, adding javascript to the wordpress sidebar.
It’s also simple. Go to Presentation - Widgets. Add a Text Widget to your sidebar. Give any title, add your javascript code to your text widget, and then save your sidebar.
Third, adding javascript to the wordpress blog post.
This part is not simple because you can not add javascript code to your blog posts by default. But, don’t worry because you can use Inline JavaScript Plugin. Download this plugin, upload, and then activate it to your wordpress blog. See an example below to insert javascript to your blog.
- [inline]
- <script type="text/javascript">
- document.write("hello world!");
- script>
- [/inline]
Hope this tutorial is useful for all of you guys.
Don't forget to subscribe!



No comments:
Post a Comment