WP Plugin Review - scriptsnstyles

This WordPress plugin is similar to the Simple Custom CSS plugin except that it can handle JavaScript as well as CSS - plus you can apply CSS and JavaScript to individual pages.

So how do you know which of these to choose? Well if you just want to override some of the CSS from your theme for your entire site then Simple Custom CSS is the obvious choice - it keeps things simple. With Simple Custom CSS you have one lot of CSS that is added in to all of the pages of your site to override any of the CSS that the page would otherwise be using. If you need anything more advanced then scriptsnstyles is the plugin you should be using.

The scriptsnstyles offers a global option in the appearance menu just as Simple Custom CSS does but instead of one textarea to enter CSS it has four tabs. On the global tab you can enter your CSS either as native CSS or you can use LESS and have it converted to CSS. You can also enter JavaScript for both the head of the page (where it is seldom needed) as well as the bottom of the body. You can also enter coffeescript and have it converted to JavaScript for you.

The Hoops tab allows the definition of shortcodes for snippets of HTML to work around the limitations in what HTML can be posted in regular posts and pages. The Settings options allow you to change where the scriptsnstyles entry appears in the admin menu and whether the hoops option is on or off. The usage tab lists al the pages where scriptsnstyles code is applied. You may find that you never need to use any of these tabs apart from the global tab.

In addition to these global options there is a scriptsnstyles section added to the bottom of the editor for each post and page. This has tabs for scripts (head and bottom of body), styles (to add extra styles specifically for the one page), classes (to add extra classes to the body_class and or post_class functions), Include Scripts (to add any of the specific scripts in the dropdown list into the current page, shortcodes (which works just like the hoops tab in the global settings), and dropdown.

There are in fact so many options provided by this plugin that you almost certainly will only use a small fraction of them.It is useful though to know that the plugin does provide many additional features so that if you want to do some processing involving either JavaScript or CSS then chances are that the plugin has an option to help you do it.

About the only thing I found that the plugin couldn't handle was the uploading and referencing of scripts that are not in the include script list. You can't even use the media upload option to upload the script. Provided you have FTP access to the site you can however ftp the script into the media folder and then include JavaScript to dynamically load that script. In most cases, particularly where the script is only needed on one or two pages it can simply be incorporated directly into the page itself.

Overall this script is very easy to use when it comes to the simpler options that it provides and the fact that it has the more complex options means that the author has already experienced many of the issues you might have using it and has already figured out a solution - you just need to match the problem to the solution in order to use the appropriate fix.

go to top

FaceBook Follow
Twitter Follow