跳到内容

Custom JS

v2.0.0

seosbg · 2016年9月20日 上架

Add custom JavaScript and HTML to the head, body or footer of your site, admin area and login page.

正在使用
100+
评分
暂无
累计下载
4,760
最近更新
2026年11月4日
需要 WordPress 4.6+已测试到 7.1.5PHP 5.6+

贡献者

截图

Admin Panel view of submitted form data.
Admin Panel view of submitted form data.

Custom JS lets you add JavaScript (analytics, tag managers, chat widgets, pixels, your own scripts) to WordPress without editing theme files.

Features

  • Head, Body and Footer code – including the new “after ” location (Google Tag Manager noscript etc.).
  • Unlimited snippets – named pieces of code you can switch on/off, duplicate and organise.
  • Conditions per snippet – front page, blog, posts, pages, archives, search, 404, specific IDs/slugs, URL rules with wildcards, exclusions.
  • Visitor targeting – everyone, logged-in, logged-out, non-admins, specific user roles, desktop or mobile.
  • Scheduling – start and end date/time for campaigns and promos.
  • External scripts – add a script by URL with async / defer / type=”module”.
  • Auto-wrap – paste plain JavaScript, the plugin adds the
  • Load jQuery on demand for snippets that need it.
  • Admin area and login page code.
  • Per-page code – a “Custom JS” box on the post/page edit screen, with an option to switch off the global code on that page.
  • Code editor with syntax highlighting, line numbers, linting and an optional dark theme. Ctrl+S / Cmd+S to save.
  • Revisions – every save is kept; view and restore older versions.
  • Import / Export to JSON – backups and moving between sites.
  • Safe mode – ?cjs_safe_mode=1 or define( 'CJS_SAFE_MODE', true ); disables all custom code if something breaks.
  • Kill switch, “do not load for admins” (keeps your visits out of analytics), HTML comment markers for debugging.
  • Secure – nonces on every action; on multisite only super admins can add code.
  • Developer filters: cjs_capability, cjs_front_allowed, cjs_snippet_should_run, cjs_snippet_code, cjs_output_{option}, cjs_metabox_post_types.

Free WordPress Themes by SEOS Themes

Custom JS is made by SEOS Themes – the team behind high quality, HTML5, responsive and mobile friendly WordPress themes, downloaded more than 2,000,000 times.

Blog, news & magazine, online shop, business, real estate, restaurant, photography, music, portfolio and many more – most of them completely free.

Browse all themes at seosthemes.com

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums