Customize your WordPress site’s appearance by easily adding custom CSS and JS code without even having to modify your theme or plugin files. This is perfect for adding custom CSS tweaks to your site.
- Text editor with syntax highlighting
- Print the code inline or included into an external file
- Print the code in the header or the footer
- Add CSS or JS to the frontend or the admin side
- Add as many codes as you want
- Keep your changes also when you change the theme
Manage Custom Codes
What if I want to add multiple external CSS codes?
If you write multiple codes of the same type (for example: two external CSS codes), then all of them will be printed one after another
Will this plugin affect the loading time?
When you click the
Save button the codes will be cached in files, so there are no tedious database queries.
Does the plugin modify the code I write in the editor?
No, the code is printed exactly as in the editor. It is not modified/checked/validated in any way. You take the full responsability for what is written in there.
My code doesn’t show on the website
Try one of the following:
1. If you are using any caching plugin (like “W3 Total Cache” or “WP Fastest Cache”), then don’t forget to delete the cache before seing the code printed on the website.
2. Make sure the code is in Published state (not Draft or in Trash).
3. Check if the
wp-content/uploads/custom-css-js folder exists and is writable
Does it work with a Multisite Network?
What if I change the theme?
The CSS and JS are independent of the theme and they will persist through a theme change. This is particularly useful if you apply CSS and JS for modifying a plugin’s output.
Can I use a CSS preprocesor like LESS or Sass?
For the moment only plain CSS is supported, but you can check out the Pro version in case you need a CSS preprocessor.
Can I upload images for use with my CSS?
Yes. You can upload an image to your Media Library, then refer to it by its direct URL from within the CSS stylesheet. For example:
Can I use CSS rules like @import and @font-face?
Who can publish/edit/delete Custom Codes?
By default only the Administrator will be able to publish/edit/delete Custom Codes. On the plugin activation there is a role created called Web Designer. You can assign this role to a non-admin user in order to allow to publish/edit/delete Custom Codes. On the plugin’s Settings page there is an option to remove this role.
Compatibility with qTranslate X plugin
- If the qTranslate X plugin is adding some
[:en]characters to your code, then you need to remove the
custom-css-jspost type from the qTranslate settings. Check out this screenshot on how to do that.
My website has HTTPS urls, but the codes are linked as HTTP
The URL for the linked Codes is built just like the URL for other media (from Media Library) by using the WordPress Address option found on the WP Admin – Settings – General page, as shown in this screenshot. If the WordPress Address has HTTPS in the url, then the Custom Codes and all the other media will have HTTPS in the url.
- From the WP admin panel, click “Plugins” – “Add new”.
- In the browser input box, type “Simple Custom CSS and JS”.
- Select the “Simple Custom CSS and JS” plugin and click “Install”.
- Activate the plugin.
- Download the plugin from this page.
- Save the .zip file to a location on your computer.
- Open the WP admin panel, and click “Plugins” – “Add new”.
- Click “upload”.. then browse to the .zip file downloaded from this page.
- Click “Install”.. and then “Activate plugin”.
- Download the plugin from this page.
- Extract the .zip file to a location on your computer.
- Use either FTP or your hosts cPanel to gain access to your website file directories.
- Browse to the
- Upload the extracted
custom-css-jsfolder to this directory location.
- Open the WP admin panel.. click the “Plugins” page.. and click “Activate” under the newly added “Simple Custom CSS and JS” plugin.
- Fix: remove the Codemirror library added from WP Core
- Tweak: use protocol relative urls for custom code linked file
- Declare compatibility with WordPress 5.2
- Tweak: update the Bootstrap and jQuery library links
- Declare compatibility with WooCommerce 3.6
- Fix: remove the editor scrollbar
- Tweak: rename “First Page” to “Homepage” to avoid misunderstandings
- Fix: avoid conflicts with other plugins that use CodeMirror as their editor
- Fix: another solution for the bug related to the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
- Fix: the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
- Fix: remove compatibility with the Shortcoder plugin. Bug https://wordpress.org/support/topic/edit-page-blank-8/
- Declare compatibility WooCommerce 3.5
- Fix: keep the editor LTR even on RTL websites
- Fix: flush rewrite rules after modifying the “Add Web Designer role” option
- Fix: the default comment for JS for other locales than “en_” was removing the tags
- Tweak: make the search dialog persistent
- Tweak: correct the tooltip info for the ‘ccs_js_designer’ option
- Fix: add the add/edit/delete custom post capabilities to the admin and ‘css_js_designer’ roles on plugin activation
- Fix: “The link you followed has expired” on custom code save if the WP Quads Pro plugin is active
- Fix: PHP warning for PHP 7.2
- Change: add/remove the “Web Designer” role only on activating/deactivating the option in the Settings page
- Change: check the option name against an array of allowed values
- Feature: permalink slug for custom codes
- Fix: set the footer scripts to a higher priority
- Update the french translation
- Fix: allow admin stylesheets from ACF plugin, otherwise it breaks the post.php page
- Tweak: for post.php and post-new.php page show code’s title in the page title
- Feature: add the “Keep the HTML entities, don’t convert to its character” option
- Reverse to the
wp_footerfunction for the footer scripts, as the
print_footer_scriptsfunction is used also in the admin, which lead to many broken back-ends
- Use the
print_footer_scriptsfunction for the footer scripts (https://wordpress.org/support/topic/footer-code-position-before-external-scripts-is-overridden/)
- Escape selectively the HTML characters in the editor (https://wordpress.org/support/topic/annoying-bug-in-text-editor/)
- Fix: https://wordpress.org/support/topic/broken-layout-of-code-snippet-type-color-tag-css-html-js-on-main-list-table/
- Feature: add filter by code type
- Feature: make the ‘Modified’ column sortable
- Fix: if the default comment remains in the “Add Custom JS”, then there was no tags added to the code, as the comment contained a tag
- Feature: add “Last edited …” information under the editor
- Fix: jump to line when searching
- Tweak: add message that the Code Revision data is dummy
- Declare compatibility with WooCommerce 3.2 (https://woocommerce.wordpress.com/2017/08/28/new-version-check-in-woocommerce-3-2/)
- Fix: avoid conflicts with other plugins that implement the CodeMirror editor
- Update the CodeMirror library to 5.28 version
- Add French and Polish translation
- Fix: compatibility with the CSS Plus plugin
- Code refactoring
- Add activate/deactivate link to row actions and in Publish box
- Make the activate/deactivate links work with AJAX
- Add Turkish translation
- Security fix according to VN: JVN#31459091 / TN: JPCERT#91837758
- Feature: option for adding Codes to the Login Page
- Fix: compatibility issue with the HTML Editor Syntax Highlighter plugin
- Feature: prepare the plugin for translation
- Feature: create the Web Designer role
- Feature: allow Custom Codes to be managed only by users with the right capabilities
- Feature: circumvent external file caching by adding a GET parameter
- Add special offer for Simple Custom CSS and JS pro
- Compatibility with WP4.7. The “custom HTML code” was not showing up anymore
- Feature: add search within the editor accessible with Ctrl+F
- Feature: make the inactive rows opaque
- Fix: there was a space in the htmlmixed.%20js url
- Feature: make the editor resizable
- Feature: add HTML code
- Fix: add htmlentities when showing them in the editor
- Feature: when adding a code, show more explanations as comments
- Fix: compatibility with other plugins that interfere with the CodeMirror editor
- Add the “Add CSS Code” and “Add JS Code” buttons next to the page title
- Compatibility with WP 4.6: the “Modified” column in the Codes listing was empty
- Add the includes/admin-notices.php and includes/admin-addons.php
- Feature: change the editor’s scrollbar so it can be caught with the mouse
- Check compatibility WordPress 4.5.3
- Add special offer for Simple Custom CSS and JS pro
- Fix: on multisite installs have to create the custom-css-js folder in the upload dir for each site
- Fix: the
deactivate codestar wasn’t working when first time clicked
- Fix: In the add/edit Code page filter which meta boxes are allowed
- Fix: If the custom-css-js folder is not created of is not writable, issue an admin notice.
- Feature: enable/disable codes
- Feature: add a GET parameter at the end of external files in order to over circumvent caching
- Fix: don’t add the “” tag from the code if already present.
- Fix: the number of codes were limited because query_posts is automatically inserting a limit
- Fix: solved a conflict with the
- Tweak: Do not enqueue scripts unless we are editing the a custom-css-js type post.
- Fix: The register_activation_hook was throwing a notice
- Fix: add window.onload when initializing the CodeMirror editor
- Tweak: Differentiated the option names for “Where on page” and “Where in site”
- Fix: set the correct language modes to CodeMirror object
- Tweak: remove the
- Tweak: use the compressed version of CodeMirror
- Tweak: changed the submenus to “Add Custom CSS” and “Add Custom JS” instead of “New Custom Code”
- Tweak: Use
admin_enqueue_scriptsfor external files in order to add priority to the code
- Fix: For longer code the last line in the editor was hidding because of the CodeMirrorBefore div.
- Fix: when a code was sent into Trash it still wasn’t shown on the website
- Tweak: for external files use wp_head and wp_footer instead of wp_enqueue_style. Otherwise the CSS and JS is inserted before all the other scripts and are overwritten.
- Tweak: Save all the codes in files in order to save on database queries
- Tweak: Rewrite the readme.txt in the form of FAQ for better explanations
- Initial commit