WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Insert JavaScript and CSS

Adds fields to the post and page edit pages that allow you to insert custom JavaScript or CSS for that post or page.

Do I need to wrap in script or style tags?

Does't matter. If you do, they're left in place. If you don't, they'll be added.

What about archive pages?

Unless you specifically tell it not to, this plugin will include any JavaScript or CSS included in a post on archive pages as well.

This can lead to conflicts. Take for example two posts, one with body { background: blue; } and the other with body { background: green; }. Whichever post comes last will take priority, but that's probably not what you want.

If you add a custom field named ijsc_single_only to your post the JavaScript or CSS will only add when is_single() is true. It doesn't matter what value you put in ijsc_single_only, only that there is a value.

Who can insert JavaScript or CSS

By default users with the capability upload_files are allowed to insert JavaScript or CSS into posts. This seemed to be a logical choice as you need to have a certain level of trust for users to upload files.

If you would like to change what capability is required you can edit the IJC_CAPABILITY_REQUIRED constant defined in insert-javascript-css.php inside the plugin folder.

Requires: 3.0 or higher
Compatible up to: 3.4.2
Last Updated: 2012-7-26
Downloads: 19,731

Ratings

4 stars
4.3 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

50,2,1
100,2,2
0,2,0
100,1,1
100,1,1
0,1,0
100,1,1
0,1,0