sandywp / plugins / scripts-n-styles
Scripts n Styles
This plugin allows Admin users to individually add HTML, custom CSS, Classes and JavaScript directly to Post, Pages or any other custom post types.
Ready in seconds.
v3.5.8 30,000+ installs WP 5.0+ PHP 7.4+

What you get inside
6 screens-
Settings Page for Writing Scripts n Styles that apply to the whole blog.
-
The Scripts panel of the Meta Box.
-
The Styles panel of the Meta Box.
-
The Classes panel. Add classes to the Style dropdown!
-
Enqueue panel. You can enqueue jQuery from here if you need!
-
Your styles are reflected in the Editor.
About this plugin
This plugin allows Admin users the ability to add custom CSS and JavaScript directly into individual Post, Pages or any other registered custom post types. You can also add classes to the body tag and the post container. There is a Global settings page for which you can write Scripts n Styles for the entire blog.
Admin’s can also add classes to the TinyMCE “Formats” dropdown which users can use to style posts and pages directly. As of Scripts n Styles 3+ styles are reflected in the post editor.
Because only well trusted users should ever be allowed to insert JavaScript directly into the pages of your site, this plugin restricts usage to admin type users. Admin’s have access to even more sensitive areas by definition, so that should be relatively safe 😉
Notes about the implementation:
- Admin users, or more specifically, any user with the
manage_optionsandunfiltered_htmlcapabilities (which by default is only the admin type user) can use this plugin’s functionality. Some plugins extend user rolls, and so this plugin would naturally extend include rolls that have the appropriate capability. - CSS Styles are embeded, not linked, at the bottom of the
headelement withstyletags by usingwp-head. If your theme doesn’t have this hook, this plugin (as well as most others) won’t work. - JavaScript is embeded, not linked, at the bottom of the
body(orhead) element withscripttags by usingwp-footer(orwp-head). If your theme doesn’t have this hook, this plugin (as well as most others) won’t work. - There is no input validation. This plugin puts exactly what you type in the meta box directly into the
htmlwith no error checking. You are an Admin, and we trust you to be carefull. Try not to break anything. - Do to the licensing of the libraries used, this plugin is released “GPL 3.0 or later” if you care about those things.
Questions
- Will I lose all of my custom Styles and Scripts if I uninstall the plugin?
Yes, absolutely. YOU WLL LOSE ALL CUSTOMIZATIONS. Be sure that you do not want these customizations before you uninstall.
- Why would you do that to me?
Well, because plugins are supposed to, and should be expected to clean up after themselves. If you disable and uninstall the plugin, as a developer, I am supposed to assume that you no longer want me to store all of that now useless data in your database.
- Can I get around that somehow?
Sure, if you are an Admin, just go to the plugin editor and wipe out the uninstall.php and then WordPress will not delete the meta data on uninstall.
sandywp / also on the shelf
Try another plugin
4.8 · 1M+ installs
Loginizer is a WordPress security plugin which helps you fight against bruteforce attacks.
4.4 · 900K+ installs
Redux is a simple, truly extensible, and fully responsive options framework for WordPress themes and plugins. It ships with an…
4.6 · 300K+ installs
Lets you edit the WordPress admin menu. You can re-order, hide or rename menus, add custom menus and more.
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.