Linux 软件免费装
Banner图

WP Add Custom CSS and JS

开发者 d3logics
vinit-sharma
devshubham715
narenchouhan
更新时间 2026年6月4日 19:53
捐献地址: 去捐款
PHP版本: 7.0 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

custom css custom js custom javascript add style customize theme

下载

1.0.1 2.0.0 2.0.1 1.0.0

详情介绍:

WP Add Custom CSS and JS lets you add custom CSS and custom JavaScript to your WordPress website directly from the admin panel — without editing your theme, child theme, or plugin files. Write your code in a professional editor with syntax highlighting and autocomplete, and it is applied to your site instantly. Add as many separate snippets as you want, manage them all from one screen, and decide exactly how and where each one loads. Every snippet can be automatically minified (compressed) so your custom code never slows your site down. This plugin is developed and maintained by d3logics. Browse all of our free WordPress plugins at d3logics.com/plugins. New to this? Read our full step-by-step guide: How to Add Custom CSS and JavaScript in WordPress. Why use this plugin? Key Features Made by d3logics Need a custom WordPress plugin, theme, or website? The team at d3logics builds custom WordPress solutions. See more of our work and free plugins at https://d3logics.com/plugins.

安装:

  1. From the WordPress admin, go to Plugins → Add New and search for "WP Add Custom CSS and JS", or upload the plugin ZIP.
  2. Click Install Now, then Activate.
  3. A new Add Custom CSS & JS menu appears in your admin sidebar.
  4. Click Add Custom CSS to add CSS, or Add Custom JS to add JavaScript.
  5. Write your code, choose your options, and click Publish. Your minified code is applied to the site immediately.

屏幕截图:

  • The custom CSS editor with syntax highlighting and autocomplete.
  • The custom JS editor with per-snippet options (internal/external, header/footer, frontend/admin).

升级注意事项:

2.0.1 Ensures all version 2.0 files are published correctly, plus improved documentation. Upgrade recommended. 2.0.0 Major update: add unlimited CSS/JS snippets with per-snippet options, an autocomplete editor, and automatic minification. Your existing code is imported automatically.

常见问题:

How do I add custom CSS in WordPress?

Go to Add Custom CSS & JS → Add Custom CSS, write your CSS in the editor, choose where it should load, and click Publish. It is applied to your whole site instantly — no theme files touched. For a full walkthrough, see our guide: How to Add Custom CSS and JavaScript in WordPress.

How do I add custom JavaScript in WordPress?

Go to Add Custom CSS & JS → Add Custom JS, write your JS, and click Publish.

Can I add more than one CSS or JS code?

Yes. You can add unlimited separate snippets. Each one has its own title, options, and on/off state, and they are all listed in the management table.

What is the difference between "Internal" and "External"?

Internal prints the code inline directly in the page. External saves the code to a cached .css/.js file that loads as a normal file — best for larger code and performance.

Does it minify (compress) my code?

Yes. With "Minify output" enabled (the default), each snippet is automatically compressed when you save it.

Will this plugin slow down my site?

No. External snippets are served as cached static files and minified output keeps them small, so there are no extra database queries on the front end.

My code does not show on the website. What should I do?

  1. If you use a caching plugin, clear the cache after saving.
  2. Make sure the snippet status is Published (not Draft or Trash).
  3. Confirm the snippet's "Apply on" option matches where you are looking (Front end vs Admin).
  4. Check that the wp-content/uploads/wp-add-custom-css-and-javascript folder exists and is writable (used for external files).

Will my code be lost if I change my theme?

No. Your custom CSS and JS are stored independently of the theme, so they stay active when you switch or update themes.

Can I reference an image in my CSS?

Yes. Upload the image to your Media Library, then refer to it by its direct URL inside your CSS, for example: body { background-image: url('https://example.com/wp-content/uploads/2026/01/bg.jpg'); }

Can I use CSS rules like @import and @font-face?

Yes. Your CSS is output exactly as written.

Who can add or edit the code?

Only administrators (users with the edit_theme_options capability) can add, edit, or delete custom CSS/JS. Every action is also protected by a WordPress nonce.

Does it work on Multisite?

Yes, the plugin works on a WordPress Multisite network (activate it per site).

Where can I get support or more plugins?

This plugin is built by d3logics. Visit d3logics.com/plugins for support and our other free WordPress plugins.

更新日志:

2.0.1 2.0.0 1.1.0 1.0.1 1.0.0