描述
The Easy Custom Code WordPress plugin adds LESS, CSS, JavaScript and HTML editors to the WordPress Customizer.
You want to change a colour, hide a button or add a tracking code. Editing the theme means your change is gone after the next theme update. With this plugin you write the code in the Customizer, preview it, and click Publish. The code is saved in its own files, so theme updates leave it alone.
Setup and every editor are explained in the official documentation.
How it works
- Go to Appearance Customize Easy Custom Code.
- Write CSS or LESS, JavaScript, or HTML in the editor you need. The preview updates as you type.
- Click Publish. Your styles are compiled into one CSS file and your scripts into one JS file.
Free features
- CSS and LESS editor: plain CSS works as it is; LESS adds variables, nesting and mixins. CSS and LESS »
- JavaScript editor: add JavaScript or jQuery without script tags. JavaScript »
- Unlimited external stylesheets and scripts: paste the URL of a library such as Bootstrap or Font Awesome and the plugin adds the tag for you.
- JavaScript position: load your scripts in the footer (default) or in the head. Settings »
- Custom HTML in three places: inside the head tag, right after the opening body tag, and before the closing body tag, for tracking codes, verification tags and widgets. HTML code »
- Live preview: see every change in the Customizer before you publish it.
- Cache-friendly files: compiled CSS and JS files get new names when they change, so caching plugins and CDNs pick up the new version.
PRO features
Upgrade to Easy Custom Code PRO for a smaller stylesheet and more room to write. Plans cover 1, 3, 5 or unlimited sites and include 1 year of updates and support, with a 30-day money-back guarantee.
- Minified CSS: the compiled stylesheet is written without spaces and comments after each publish.
- Full-screen editor: open any editor in a large window for long stylesheets and scripts.
What is LESS?
LESS is a CSS preprocessor. It adds variables, nested rules and mixins, so your stylesheets are shorter and easier to change.
LESS code:
@global_color: #FF0000;
@global_font_size: 14px;
@secondary_color: #CCC;
body {
color: @global_color;
font-size: @global_font_size;
}
.container {
color: @secondary_color;
font-size: @global_font_size * 2;
}
Outputs the following CSS:
body {
color: #FF0000;
font-size: 14px;
}
.container {
color: #CCC;
font-size: 24px;
}
For the full LESS documentation, visit lesscss.org.
Documentation
- Introduction
- Installation
- Accessing the settings
- CSS and LESS
- JavaScript
- HTML code
- Settings
- FAQ
- Get support
Source Code
The PHP source of this plugin is readable in the distributed files. The bundled LESS compilers are third-party libraries: lessphp (includes/libs/lessphp.php, used to compile on publish) and less.js (public/js/less.min.js, used only for the live preview in the Customizer), whose source is at https://github.com/less/less.js.
External Services
The plugin does not send your data to Web357 or any other service. It only loads the external stylesheets and scripts whose URLs you add yourself; those files are requested by your visitors’ browsers from the servers you chose. A LESS @import of a remote URL is fetched by your server when you publish.
屏幕截图
安装
From the WordPress dashboard
- Go to Plugins Add New Plugin.
- Search for Easy Custom Code by Web357.
- Click Install Now, then Activate.
- Open Appearance Customize Easy Custom Code.
Manual upload
- Download the
easy-custom-code.zipfile. - Go to Plugins Add New Plugin Upload Plugin, choose the zip, and click Install Now.
- Activate the plugin and open Settings Easy Custom Code to choose the JavaScript position.
Step-by-step screenshots: Installation guide.
常见问题
-
What is free, and what is PRO?
-
Free: the CSS/LESS, JavaScript and HTML editors, unlimited external stylesheets and scripts, the JavaScript position setting, and live preview. PRO: minified CSS output, the full-screen editor, and 1 year of updates and support. Compare plans »
-
Why should I use Easy Custom Code instead of editing my theme’s style.css?
-
Editing theme files, or even a child theme, means your changes can break or disappear after a theme update. Easy Custom Code stores your custom LESS, CSS, JavaScript and HTML in the database and outputs them as separate files, so theme updates leave them alone.
-
Do I need to know LESS to use this plugin?
-
No. You can paste plain CSS into the LESS/CSS field and it works the same. LESS is optional and is useful when you want variables, nesting and mixins.
-
You choose. Load it in the footer (recommended for most scripts) or inside the head, for example for verification tags. Settings »
-
Can I add Google Analytics, Meta Pixel, Google Tag Manager, or chat widgets?
-
Yes. Use the “In head”, “After body” or “Before closing body” sections to paste the tracking code, verification tag or widget, without touching theme files.
-
Does the plugin minify the compiled CSS?
-
Yes, in PRO. Turn on Minify CSS in Settings. The free version compiles your LESS/CSS into one readable stylesheet.
-
Will my custom code load on every page of the site?
-
Yes. Styles and scripts are loaded on every frontend page. For page-specific scripts, use the conditions of your tag manager.
-
Will my custom CSS and JS be deleted if I uninstall the plugin?
-
Yes. All custom LESS, CSS, JavaScript and HTML added through this plugin, including the compiled files, is removed on uninstall. Copy your code first if you plan to reuse it.
-
Is Easy Custom Code compatible with caching and optimization plugins?
-
Yes. The compiled CSS and JS are written to files with unique names, so they work with caching plugins such as WP Rocket, LiteSpeed Cache and W3 Total Cache, and with CDNs.
-
Where is the full documentation?
-
Start here: Easy Custom Code docs. For help, contact support.
评价
贡献者及开发者
「Easy Custom Code (LESS/CSS/JS) – Live editing」是开源软件。 以下人员对此插件做出了贡献。
贡献者更新日志
30-Sep-2026 : v1.1.5
- Minor fixes and improvements.
24-Aug-2026 : v1.1.4
- Compatibility with WordPress 7.1.
- Minor fixes and improvements.
25-May-2026 : v1.1.3
- Full compatibility with WordPress 7.x.
- Minor fixes and improvements.
31-Jan-2025 : v1.1.2
- Full compatibility with WordPress 6.7.x.
- Minor fixes and improvements.
27-Nov-2024 : v1.1.1
- Bug Fix: HTML entities (e.g.,
>,<) are now properly decoded. - Minor fixes and performance improvements.
12-Aug-2024 : v1.1.0
- Bug Fix: LESS syntax errors for
&:focusand&:hoverresolved.
19-Jul-2024 : v1.0.9
- Full compatibility with WordPress 6.6.x.
- LESS CSS compiler updated to v0.8.0.
- Minor fixes and improvements.
18-Apr-2024 : v1.0.8
- Full compatibility with WordPress 6.5.x.
- Minor fixes and improvements.
23-Oct-2023 : v1.0.7
- Full compatibility with WordPress 6.3.x.
- Minor fixes and improvements.
07-Jun-2023 : v1.0.6
- Compatibility: Fully compatible with WordPress 6.2.
- Minor fixes and improvements.
14-Jun-2022 : v1.0.5
- Compatibility: Fully compatible with WordPress 6.0.
- Minor fixes and improvements.
11-Feb-2022 : v1.0.4
- Compatibility: Fully compatible with WordPress 5.9.
- Minor fixes and improvements.
28-Jul-2021 : v1.0.3
- Compatibility: Fully compatible with WordPress 5.8.
- Minor fixes and improvements.
09-Apr-2021 : v1.0.2
- Compatibility: Fully compatible with WordPress 5.7.
- Minor fixes and improvements.
16-Oct-2019 : v1.0.1
- New Feature: Add custom code in the head tag.
- New Feature: Add custom code right after the body tag opens.
- New Feature: Add custom code before the closing body tag.
- Improvement: Unique CSS and JS file names for better cache handling.
- Improvement: Removed the manual CSS file name option; now, files are generated dynamically.
- Improvement: Enhanced language file (.pot) with additional strings.
08-Oct-2019 : v1.0.0
- Initial beta release.
