{"id":99740,"date":"2019-03-14T09:44:59","date_gmt":"2019-03-14T09:44:59","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wp-add-custom-css-and-javascript\/"},"modified":"2026-06-04T09:20:33","modified_gmt":"2026-06-04T09:20:33","slug":"wp-add-custom-css-and-javascript","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/wp-add-custom-css-and-javascript\/","author":16410188,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.1","stable_tag":"2.0.1","tested":"6.8.5","requires":"4.7","requires_php":"7.0","requires_plugins":null,"header_name":"WP Add Custom CSS and JS","header_author":"d3logics","header_description":"Add Custom Ja and css from ap admin panel","assets_banners_color":"6876af","last_updated":"2026-06-04 09:20:33","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/d3logics.com","header_plugin_uri":"http:\/\/d3logics.com\/plugins\/wp-add-custom-css-js","header_author_uri":"http:\/\/d3logics.com","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1441,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"d3logics","date":"2019-03-14 10:51:46"},"1.0.1":{"tag":"1.0.1","author":"d3logics","date":"2022-03-22 09:55:18"},"2.0.0":{"tag":"2.0.0","author":"d3logics","date":"2026-06-04 08:10:56"},"2.0.1":{"tag":"2.0.1","author":"d3logics","date":"2026-06-04 09:20:33"}},"upgrade_notice":{"2.0.1":"<p>Ensures all version 2.0 files are published correctly, plus improved documentation. Upgrade recommended.<\/p>","2.0.0":"<p>Major update: add unlimited CSS\/JS snippets with per-snippet options, an autocomplete editor, and automatic minification. Your existing code is imported automatically.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3560864,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128}},"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3560597,"resolution":"772x250","location":"assets","locale":"","width":2056,"height":765}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","2.0.0","2.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3560572,"resolution":"1","location":"assets","locale":"","width":1920,"height":869},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3560572,"resolution":"2","location":"assets","locale":"","width":1920,"height":869},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3560572,"resolution":"3","location":"assets","locale":"","width":1920,"height":869}},"screenshots":{"1":"Manage all your custom CSS and JS snippets from one table.","2":"The custom CSS editor with syntax highlighting and autocomplete.","3":"The custom JS editor with per-snippet options (internal\/external, header\/footer, frontend\/admin)."}},"plugin_section":[],"plugin_tags":[228272,2001,21560,21561,92750],"plugin_category":[],"plugin_contributors":[165699,165700,162794],"plugin_business_model":[],"class_list":["post-99740","plugin","type-plugin","status-publish","hentry","plugin_tags-add-style","plugin_tags-custom-css","plugin_tags-custom-javascript","plugin_tags-custom-js","plugin_tags-customize-theme","plugin_contributors-d3logics","plugin_contributors-devshubham715","plugin_contributors-vinit-sharma","plugin_committers-d3logics"],"banners":{"banner":"https:\/\/ps.w.org\/wp-add-custom-css-and-javascript\/assets\/banner-772x250.jpg?rev=3560597","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wp-add-custom-css-and-javascript\/assets\/icon-128x128.png?rev=3560864","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-add-custom-css-and-javascript\/assets\/screenshot-1.png?rev=3560572","caption":"Manage all your custom CSS and JS snippets from one table."},{"src":"https:\/\/ps.w.org\/wp-add-custom-css-and-javascript\/assets\/screenshot-2.png?rev=3560572","caption":"The custom CSS editor with syntax highlighting and autocomplete."},{"src":"https:\/\/ps.w.org\/wp-add-custom-css-and-javascript\/assets\/screenshot-3.png?rev=3560572","caption":"The custom JS editor with per-snippet options (internal\/external, header\/footer, frontend\/admin)."}],"raw_content":"<!--section=description-->\n<p><strong>WP Add Custom CSS and JS<\/strong> lets you add custom CSS and custom JavaScript to your WordPress website directly from the admin panel \u2014 without editing your theme, child theme, or plugin files. Write your code in a professional editor with <strong>syntax highlighting and autocomplete<\/strong>, and it is applied to your site instantly.<\/p>\n\n<p>Add <strong>as many separate snippets as you want<\/strong>, manage them all from one screen, and decide exactly how and where each one loads. Every snippet can be <strong>automatically minified (compressed)<\/strong> so your custom code never slows your site down.<\/p>\n\n<p>This plugin is developed and maintained by <a href=\"https:\/\/d3logics.com\/\">d3logics<\/a>. Browse all of our free WordPress plugins at <a href=\"https:\/\/d3logics.com\/plugins\">d3logics.com\/plugins<\/a>.<\/p>\n\n<p>New to this? Read our full step-by-step guide: <a href=\"https:\/\/d3logics.com\/how-to-add-custom-css-and-javascript-in-wordpress\/\">How to Add Custom CSS and JavaScript in WordPress<\/a>.<\/p>\n\n<h4>Why use this plugin?<\/h4>\n\n<ul>\n<li><strong>Add custom CSS<\/strong> to restyle your theme without touching theme files.<\/li>\n<li><strong>Add custom JavaScript<\/strong> for tracking codes, animations, widgets, and tweaks.<\/li>\n<li>Your code is <strong>safe when you switch or update your theme<\/strong>.<\/li>\n<li>Perfect for quick design fixes and adding third-party snippets.<\/li>\n<\/ul>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li><strong>Unlimited snippets<\/strong> \u2014 add as many custom CSS and JS codes as you want.<\/li>\n<li><strong>Management screen<\/strong> \u2014 every snippet is listed in a table (like Posts) where you can edit, enable\/disable, and delete.<\/li>\n<li><strong>Live code editor<\/strong> with syntax highlighting, line numbers, bracket matching, search, and <strong>CSS \/ JavaScript autocomplete<\/strong> (powered by CodeMirror).<\/li>\n<li><strong>Per-snippet options:<\/strong>\n\n<ul>\n<li>Print the code <strong>inline (internal)<\/strong> or save it to an <strong>external cached file<\/strong>.<\/li>\n<li>Load the code in the <strong>header<\/strong> or the <strong>footer<\/strong>.<\/li>\n<li>Apply the code on the <strong>front end<\/strong>, the <strong>admin<\/strong> area, or <strong>both<\/strong>.<\/li>\n<\/ul><\/li>\n<li><strong>Automatic minification<\/strong> \u2014 compress your CSS\/JS for the fastest possible load time.<\/li>\n<li><strong>External files are cached<\/strong> \u2014 no database queries on the front end, so there is no performance hit.<\/li>\n<li><strong>Keeps your code when you change themes.<\/strong><\/li>\n<li><strong>Secure<\/strong> \u2014 capability checks and WordPress nonces on every action.<\/li>\n<li><strong>Lightweight, translation-ready, and works with any theme.<\/strong><\/li>\n<\/ul>\n\n<h4>Made by d3logics<\/h4>\n\n<p>Need a custom WordPress plugin, theme, or website? The team at <a href=\"https:\/\/d3logics.com\/\">d3logics<\/a> builds custom WordPress solutions. See more of our work and free plugins at <a href=\"https:\/\/d3logics.com\/plugins\">https:\/\/d3logics.com\/plugins<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>From the WordPress admin, go to <strong>Plugins \u2192 Add New<\/strong> and search for \"WP Add Custom CSS and JS\", or upload the plugin ZIP.<\/li>\n<li>Click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>.<\/li>\n<li>A new <strong>Add Custom CSS &amp; JS<\/strong> menu appears in your admin sidebar.<\/li>\n<li>Click <strong>Add Custom CSS<\/strong> to add CSS, or <strong>Add Custom JS<\/strong> to add JavaScript.<\/li>\n<li>Write your code, choose your options, and click <strong>Publish<\/strong>. Your minified code is applied to the site immediately.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20add%20custom%20css%20in%20wordpress%3F\"><h3>How do I add custom CSS in WordPress?<\/h3><\/dt>\n<dd><p>Go to <strong>Add Custom CSS &amp; JS \u2192 Add Custom CSS<\/strong>, write your CSS in the editor, choose where it should load, and click <strong>Publish<\/strong>. It is applied to your whole site instantly \u2014 no theme files touched. For a full walkthrough, see our guide: <a href=\"https:\/\/d3logics.com\/how-to-add-custom-css-and-javascript-in-wordpress\/\">How to Add Custom CSS and JavaScript in WordPress<\/a>.<\/p><\/dd>\n<dt id=\"how%20do%20i%20add%20custom%20javascript%20in%20wordpress%3F\"><h3>How do I add custom JavaScript in WordPress?<\/h3><\/dt>\n<dd><p>Go to <strong>Add Custom CSS &amp; JS \u2192 Add Custom JS<\/strong>, write your JS, and click <strong>Publish<\/strong>.<\/p><\/dd>\n<dt id=\"can%20i%20add%20more%20than%20one%20css%20or%20js%20code%3F\"><h3>Can I add more than one CSS or JS code?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20is%20the%20difference%20between%20%22internal%22%20and%20%22external%22%3F\"><h3>What is the difference between \"Internal\" and \"External\"?<\/h3><\/dt>\n<dd><p><strong>Internal<\/strong> prints the code inline directly in the page. <strong>External<\/strong> saves the code to a cached <code>.css<\/code>\/<code>.js<\/code> file that loads as a normal file \u2014 best for larger code and performance.<\/p><\/dd>\n<dt id=\"does%20it%20minify%20%28compress%29%20my%20code%3F\"><h3>Does it minify (compress) my code?<\/h3><\/dt>\n<dd><p>Yes. With \"Minify output\" enabled (the default), each snippet is automatically compressed when you save it.<\/p><\/dd>\n<dt id=\"will%20this%20plugin%20slow%20down%20my%20site%3F\"><h3>Will this plugin slow down my site?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"my%20code%20does%20not%20show%20on%20the%20website.%20what%20should%20i%20do%3F\"><h3>My code does not show on the website. What should I do?<\/h3><\/dt>\n<dd><ol>\n<li>If you use a caching plugin, clear the cache after saving.<\/li>\n<li>Make sure the snippet status is <strong>Published<\/strong> (not Draft or Trash).<\/li>\n<li>Confirm the snippet's \"Apply on\" option matches where you are looking (Front end vs Admin).<\/li>\n<li>Check that the <code>wp-content\/uploads\/wp-add-custom-css-and-javascript<\/code> folder exists and is writable (used for external files).<\/li>\n<\/ol><\/dd>\n<dt id=\"will%20my%20code%20be%20lost%20if%20i%20change%20my%20theme%3F\"><h3>Will my code be lost if I change my theme?<\/h3><\/dt>\n<dd><p>No. Your custom CSS and JS are stored independently of the theme, so they stay active when you switch or update themes.<\/p><\/dd>\n<dt id=\"can%20i%20reference%20an%20image%20in%20my%20css%3F\"><h3>Can I reference an image in my CSS?<\/h3><\/dt>\n<dd><p>Yes. Upload the image to your Media Library, then refer to it by its direct URL inside your CSS, for example:\n    body { background-image: url('https:\/\/example.com\/wp-content\/uploads\/2026\/01\/bg.jpg'); }<\/p><\/dd>\n<dt id=\"can%20i%20use%20css%20rules%20like%20%40import%20and%20%40font-face%3F\"><h3>Can I use CSS rules like @import and @font-face?<\/h3><\/dt>\n<dd><p>Yes. Your CSS is output exactly as written.<\/p><\/dd>\n<dt id=\"who%20can%20add%20or%20edit%20the%20code%3F\"><h3>Who can add or edit the code?<\/h3><\/dt>\n<dd><p>Only administrators (users with the <code>edit_theme_options<\/code> capability) can add, edit, or delete custom CSS\/JS. Every action is also protected by a WordPress nonce.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20multisite%3F\"><h3>Does it work on Multisite?<\/h3><\/dt>\n<dd><p>Yes, the plugin works on a WordPress Multisite network (activate it per site).<\/p><\/dd>\n<dt id=\"where%20can%20i%20get%20support%20or%20more%20plugins%3F\"><h3>Where can I get support or more plugins?<\/h3><\/dt>\n<dd><p>This plugin is built by <a href=\"https:\/\/d3logics.com\/\">d3logics<\/a>. Visit <a href=\"https:\/\/d3logics.com\/plugins\">d3logics.com\/plugins<\/a> for support and our other free WordPress plugins.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Packaging fix to ensure all 2.0 files are published correctly.<\/li>\n<li>Improved plugin page content, FAQs, and SEO.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>New: Add <strong>unlimited<\/strong> custom CSS and JS snippets, each managed from a list table like Posts.<\/li>\n<li>New: <strong>Per-snippet options<\/strong> \u2014 internal (inline) or external (cached file), header or footer, and front end \/ admin \/ both.<\/li>\n<li>New: <strong>Autocomplete<\/strong> in the editor for CSS properties and JavaScript.<\/li>\n<li>New: Each snippet can be enabled or disabled independently.<\/li>\n<li>New: Existing CSS\/JS from version 1.x is automatically imported into snippets on upgrade.<\/li>\n<li>Security: Capability checks and nonce verification throughout; PHP 8 compatible.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New: Published CSS and JS are automatically minified (compressed) for faster page loads.<\/li>\n<li>Fix: Removed <code>get_magic_quotes_gpc()<\/code>, which caused a fatal error on PHP 8.0+.<\/li>\n<li>Security: Added nonce verification to all AJAX actions and escaped all output.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Minor fixes.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Add unlimited custom CSS and custom JavaScript to WordPress from the admin panel, with a live code editor, autocomplete, and minified output.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/99740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=99740"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/d3logics"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=99740"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=99740"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=99740"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=99740"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=99740"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=99740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}