Title: WP Coder – Insert &amp; Manage Code Snippets
Author: Wow-Company
Published: <strong>2018 年 2 月 2 日</strong>
Last modified: 2026 年 2 月 14 日

---

搜尋外掛

![](https://ps.w.org/wp-coder/assets/banner-772x250.png?rev=3359026)

![](https://ps.w.org/wp-coder/assets/icon.svg?rev=3359026)

# WP Coder – Insert & Manage Code Snippets

 由 [Wow-Company](https://profiles.wordpress.org/wpcalc/) 開發

[下載](https://downloads.wordpress.org/plugin/wp-coder.4.5.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/wp-coder/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/wp-coder/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/wp-coder/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/wp-coder/#developers)

 [技術支援](https://wordpress.org/support/plugin/wp-coder/)

## 外掛說明

Tired of editing theme files to add custom scripts or styles?
 **WP Coder** lets
you insert custom HTML, CSS, JavaScript, and PHP snippets directly from your dashboard—
no coding in theme files required. Gain full control and flexibility over your site.

[Documentation](https://wpcoder.pro/category/documentation/) | [Upgrade to Pro](https://wpcoder.pro/)

### Why WP Coder?

 * **All-in-One Code Editor:** Tabbed editor for HTML, CSS, JS & PHP with CodeMirror
   syntax highlighting.
 * **Gutenberg Block:** Insert snippets directly in the block editor with live preview
   and custom attribute support.
 * **Shortcode Integration:** Use `[wp_code id="X"]` to embed snippets anywhere.
 * **Live Preview:** Instantly preview HTML & CSS without reloads in both the backend
   and Gutenberg.
 * **Performance Ready:** Minify CSS/JS, obfuscate JavaScript, and control script
   loading with `async` / `defer`.

### Ideal For

 * **Developers:** Test snippets, hooks, and debug quickly.
 * **Marketers:** Insert tracking pixels, analytics, and ad scripts.
 * **Designers & Bloggers:** Customize layouts, styles, and enhance engagement.

### Key Features

 * Insert **HTML, CSS, JS, and PHP** via powerful shortcodes.
 * Smart PHP handling: run in admin, front-end, everywhere, or only where inserted.
 * Include external libraries (Google Fonts, CDN scripts & styles).
 * **Test Mode:** Preview snippets safely before going live.
 * Import/Export snippets and settings between sites.
 * **JavaScript Obfuscation:** Protect your scripts with Dean Edwards’ Packer.
 * **Customizable Interface:** Hide unused editor tabs (HTML, CSS, JS, etc.) for
   a cleaner workflow.
 * **NAV comments:** Add inline navigation markers for faster code editing.
 * Lightweight & secure — built for performance.

### Included Tools:

#### Integrations

 * Google Tag Manager (GTM) integration with user role controls.
 * Google Analytics, Facebook Pixel, and Pinterest Pixel integration.
 * Google AdSense integration with the option to disable ads for selected user roles.

#### Content & Templates

 * Markdown Editor – Disables Gutenberg and TinyMCE, replacing them with a Markdown
   editor powered by CodeMirror.

#### Developer Tools

 * Debug Log management (enable/disable and clear log).
 * Show Page Debug Info – Display technical info for the current request in the 
   Admin Bar (template, query type, object, body classes). Admins only.
 * Theme Switcher – Quickly switch between installed themes directly from the admin
   bar.

### Included Snippets:

#### Editor & Content

 * Disable Gutenberg Editor
 * Remove Gutenberg Block CSS
 * Disable Widget Blocks
 * Enable Shortcode Execution in Widgets
 * Enable Excerpt for Pages
 * Open External Links in New Tabs
 * Change “Read More” Text

#### Admin Interface Tweaks

 * Disable Screen Options Tab
 * Disable Welcome Panel
 * Duplicate Posts
 * Disable Admin Bar

#### Login & User Access

 * Disable Login Page Language Switcher
 * Disable Login by Email
 * Disable Admin Password Reset Emails
 * Custom Login Logo
 * Custom Login Redirect URLs
 * Change Redirect After Login
 * Change Redirect After Logout

#### Media & Embeds

 * Enable SVG Upload
 * Force Lowercase Filenames
 * Default ALT Text for Avatars
 * Enable/Disable Lazy Load
 * Disable Embeds
 * Adjust oEmbed Max Dimensions

#### Core Functionality

 * Disable XML-RPC
 * Disable REST API
 * Disable Automatic Updates
 * Disable Automatic Updates Emails
 * Disable Emojis
 * Disable Shortlinks
 * Limit Post Revisions

#### Comments & Feedback

 * Disable Comments Globally
 * Disable Comment URL Field
 * Disable Self Pingbacks
 * Disable Trackbacks & Pingbacks
 * Disable HTML in Comments
 * Limit Comment Length

#### Cleanup & Optimization

 * Remove WP Version
 * Disable Attachment Pages
 * Disable RSS Feeds
 * Disable Built-in Search
 * Disable wlwmanifest Link
 * Disable Automatic Trash Emptying
 * Redirect 404 to Homepage

WP Coder simplifies your WordPress development workflow and makes customization 
safe, fast, and flexible!

Get started today and simplify your WordPress development workflow with **WP Coder**!

### Quick Start Video

### Plugin Demo:

#### Support

Need help? Ask questions and get quick answers in our [support center](https://wordpress.org/support/plugin/wp-coder).

## 螢幕擷圖

 * [[
 * HTML Block – Easily insert custom HTML snippets.
 * [[
 * CSS Block – Manage and insert custom CSS snippets.
 * [[
 * JavaScript Block – Customize your site’s functionality with JS snippets.
 * [[
 * PHP Block – Dynamically embed PHP snippets.
 * [[
 * Include External CSS & JS – Quickly link external CSS and JavaScript files.
 * [[
 * Publish Settings – Configure snippet visibility and publishing options.
 * [[
 * Snippets Manager – manage all snippets efficiently.
 * [[
 * Tools – Access helpful tools like Tracking Code Manager and Google AdSense integration.
 * [[
 * Global PHP – Insert PHP snippets globally across your website.
 * [[
 * Export/Import – Easily export and import your snippet settings.

## 適用於區塊編輯器

這個外掛提供 1 個可供 Gutenberg/區塊編輯器使用的區塊。

 *   WP Coder Snippet

## 安裝方式

### 📌 Option 1: Install via WordPress Admin

 1. Go to **`Plugins`  `Add New`** in your WordPress admin panel.
 2. Search for **“WP Coder”** and click **Install Now**.
 3. Click **Activate** after installation.

### 📌 Option 2: Install Manually

 1. **Download** the WP Coder plugin ZIP file from [WordPress.org](https://wordpress.org/plugins/wp-coder/).
 2. In WordPress admin, go to **`Plugins`  `Add New`**  **Upload Plugin**.
 3. Click **Choose File**, select the downloaded ZIP file, then click **Install Now**.
 4. After installation, click **Activate**.

### 📌 Option 3: Install via FTP

 1. **Download and unzip** the WP Coder plugin ZIP file.
 2. Upload the extracted **`wp-coder`** folder to `/wp-content/plugins/` via FTP.
 3. Go to **`Plugins`** in WordPress admin and click **Activate**.

### 🚀 Getting Started

 1. Navigate to the **`Wow Plugins  WP Coder`** section in your WordPress admin panel.
 2. Click **`Add New Snippet`** to create your first code snippet.
 3. Configure your snippet settings (HTML, CSS, JavaScript, PHP).
 4. Click **Save** to apply your changes.

## 常見問題集

### Does WP Coder support Network activation?

Currently, WP Coder doesn’t support network-wide activation. If you’re using WordPress
Multisite, activate the plugin individually on each site within your network.

### Where can I find detailed documentation?

Visit our comprehensive [official documentation](https://wpcoder.pro/category/documentation/)
for detailed guides and step-by-step instructions.

### How can I use shortcode content in HTML code?

If you include content within the shortcode like `[wp_code id="1"]Some Text[/wp_code]`,
you can insert this content into your HTML snippet using the variable `{{$shortcode_content}}`.

### Can I use shortcodes from other plugins within WP Coder snippets?

Absolutely! WP Coder allows you to embed shortcodes from any plugin within your 
HTML snippet content. You can also use WP Coder’s own shortcodes, offering enhanced
flexibility for customization.

### What is the purpose of tags in the ‘Publish’ block?

Tags help categorize and organize your snippets. When creating or editing a snippet,
assign tags in the ‘Publish’ block to easily filter and manage your snippets later.

### How do I use the link feature in the ‘Publish’ block?

The link feature helps you track where your shortcode is placed. Simply enter the
URL of the page where your shortcode is inserted in the ‘Link’ field when creating
or editing your snippet.

## 使用者評論

![](https://secure.gravatar.com/avatar/1e8e3831537901cf35b6ac185607d6e9b328d2444b372a47eaf6fd6f74db4d0c?
s=60&d=retro&r=g)

### 󠀁[Does not work for me. 403 on save](https://wordpress.org/support/topic/does-not-work-for-me-403-on-save/)󠁿

 [domesticempire](https://profiles.wordpress.org/domesticempire/) 2025 年 7 月 8
日

Does not work for me. 403 on save – any ideas? “403 Forbidden Access to this resource
on the server is denied!”

![](https://secure.gravatar.com/avatar/4c7f85794aa7fb5357b0207db7ad6068547bafa2653624f85d9df92cfd500eb7?
s=60&d=retro&r=g)

### 󠀁[Si funciona](https://wordpress.org/support/topic/si-funciona-2/)󠁿

 [googoramon](https://profiles.wordpress.org/googoramon/) 2025 年 5 月 28 日 1 則
留言

Es simple, clara y funiona para lo que se supone que fue diseñada! eso me gusta 
mucho! bien por el equipo

![](https://secure.gravatar.com/avatar/c708186bcc3e7b12780283abfec66772e974767af00e8d9e927b6faa5d0b3f36?
s=60&d=retro&r=g)

### 󠀁[excelente!!super util!!](https://wordpress.org/support/topic/excelentesuper-util/)󠁿

 [Randy](https://profiles.wordpress.org/randyrr-1/) 2025 年 4 月 8 日 1 則留言

excelente plugin, muy util para personalizar la pagina web!

![](https://secure.gravatar.com/avatar/ece1599f81446f7e88fc1e2fc4dbe63f9d17af85050a177f9c60955301d533d5?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin and excellent support!](https://wordpress.org/support/topic/amazing-plugin-and-excellent-support-15/)󠁿

 [themaras3](https://profiles.wordpress.org/themaras3/) 2023 年 11 月 23 日

Amazing plugin and easy to use! I am happy I found this plugin and the support is
AMAZING!! Thank you for everything! 5 stars!!!

![](https://secure.gravatar.com/avatar/16aca03cae7e948b7a34b96943ceef4364e44c30c0bb382e892ab64f13a823aa?
s=60&d=retro&r=g)

### 󠀁[Works except for string literals](https://wordpress.org/support/topic/works-except-for-string-literals/)󠁿

 [drahcirj](https://profiles.wordpress.org/drahcirj/) 2023 年 9 月 18 日 1 則留言

Works, except string literals, like message = We can make change for ${totalString}
with ${nickelsString} nickels and ${penniesString} pennies!; document.querySelector(‘#
status’).innerHTML = message; , display with missing whitespace. Instead of just
adding my js code to the page, this plugin breaks it into some weird eval function
that doesn’t work with whitespace: eval(function(p, a, c, k, e, d) {

![](https://secure.gravatar.com/avatar/c84fa1c64f9633ccf3264c5d3a7b3b0e8a78f89fc93506e7b7952ab5d3c84a08?
s=60&d=retro&r=g)

### 󠀁[Update Ruined My Quiz Web Code](https://wordpress.org/support/topic/update-ruined-my-quiz-web-code/)󠁿

 [Counselor24](https://profiles.wordpress.org/fatherprada/) 2023 年 8 月 10 日 5
則留言

This new update ruined my quiz web code…. I had to revert back to version 2.5.6 
for my code to work again

 [ 閱讀全部 31 則使用者評論 ](https://wordpress.org/support/plugin/wp-coder/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈WP Coder – Insert & Manage Code Snippets〉的開發相關工作。

參與者

 *   [ Wow-Company ](https://profiles.wordpress.org/wpcalc/)
 *   [ DmtLo ](https://profiles.wordpress.org/lobov/)

[將〈WP Coder – Insert & Manage Code Snippets〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/wp-coder)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/wp-coder/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/wp-coder/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/wp-coder/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/wp-coder/)。

## 變更記錄

### Helpful Links

 * [Website](https://wpcoder.pro)
 * [Documentation](https://wpcoder.pro/category/documentation/)
 * [Upgrade to Pro!](https://wpcoder.pro/)

#### 4.5

 * Added: Lazy load option for images
 * Added: Google Tag Manager integration in Tools & Integrations
 * Fixed: Snippet **Open External Links in New Tab** now correctly identifies internal
   links

#### 4.4

 * Added: **Gutenberg block** – insert and manage WP Coder snippets directly inside
   the WordPress block editor with live preview.

#### 4.3.1

 * Fixed: includes css to Live preview

#### 4.3

 * Added: **Markdown Editor** in Tools for writing with Markdown syntax.
 * Added: **Debug Tools** section in Tools, including:
    - Show Page Debug Info
    - Theme Switcher
    - Plugin Switcher
 * Improved: Tools page layout – tools are now grouped into sections for easier 
   navigation.

#### 4.2

 * Added: Debug Log page in WP Coder admin menu with options to enable/disable logging
   and clear log.
 * Added: Admin bar indicator with link to Debug Log when entries are present.

#### 4.1

 * Added: Export snippets by tags
 * Added: Export selected snippets
 * Added: Option to use CSS files only in Live Preview without loading them on the
   site

#### 4.0.3

 * Added: duplicate button for each item
 * Improved: Live Preview block behavior and rendering

#### 4.0.2

 * Improved: Reorganized method order in DBManager class for better readability 
   and maintenance
 * Improved: Minor SQL formatting for consistency
 * Cleaned: Minor code style improvements according to WordPress Coding Standards(
   WPCS)

#### 4.0.1

 * Improved: Added `matchBrackets: true` option for the JavaScript editor to highlight
   matching brackets when editing code.

#### 4.0

 * Improved: Refreshed interface for better user experience.
 * Added: “Open External Links in New Tab” snippet.
 * Added: “Redirect 404 to Homepage” snippet.
 * Added: “Limit Comment Length” snippet.
 * Added: “Disable HTML in Comments” snippet.
 * Added: “Disable Trackbacks & Pingbacks” snippet.
 * Added: Live preview feature for HTML & CSS snippets.

#### 3.6.1

 * Fixed: Security issue in escaping within list files.

#### 3.6

 * Added: Custom locations for PHP snippet inclusion.
 * Added: Option to hide tabs in settings.
 * Fixed: Admin style compatibility for Safari browser.

#### 3.5.2

 * Fixed: Minor admin style improvements.
 * Fixed: Various minor bugs.

#### 3.5.1

 * Changed: Adjusted user permissions to use the plugin.

#### 3.5

 * Added: “Tracking Code Manager” tool for easy integration of analytics pixels.
 * Added: “Google AdSense” integration tool.
 * Added: User roles support for “Disable WP Admin Bar” snippet.
 * Improved: Updated back-link functionality.

#### 3.4

 * Added: Pre-set popular snippets page.

#### 3.3

 * Added: Button to insert images in HTML snippets.
 * Added: HTML Minification tool.
 * Improved: Enhanced CSS Minification tool.

#### 3.2.1

 * Fixed: Minor database issue.

#### 3.2

 * Added: “Add New” and “All Codes” buttons in editor.
 * Fixed: Improved admin styling.

#### 3.1.1

 * Fixed: Database save issue.

#### 3.1

 * Added: Global PHP snippet feature.
 * Added: Content handling inside shortcodes.
 * Added: Copy shortcode button.
 * Improved: More flexible file inclusion management.
 * Changed: Shortcode updated to `[wp_code]`.

#### 3.0.5

 * Fixed: Minor update bug and admin notifications.

#### 3.0.4

 * Fixed: Updated datatable handling.

#### 3.0.3

 * Fixed: Inline scripts/styles management.

#### 3.0.2

 * Fixed: Execution order for scripts and styles.

#### 3.0.1

 * Fixed: Updating and saving snippets.
 * Fixed: Admin capability adjustments.

#### 3.0

 * Added: Test Mode and snippet Status.
 * Added: Tagging and Link options.
 * Added: Inline and Minified options for CSS.
 * Added: JavaScript optimization options.
 * Added: Export/Import feature.
 * Improved: Updated database and admin interface.

#### 2.5.6

 * Fixed: Minor bug in snippet list.

#### 2.5.5

 * Fixed: General minor fixes.

#### 2.5.4

 * Fixed: Security enhancements.

#### 2.5.3

 * Fixed: Additional security improvements.

#### 2.5.2

 * Fixed: Minor issues on main plugin page.

#### 2.5.1

 * Fixed: General minor fixes.

#### 2.5

 * Added: Alternative shortcode option.
 * Added: Shortcode processing within HTML snippets.

#### 2.4

 * Fixed: Handling of `<textarea>` tags in HTML.
 * Fixed: Shortcode functionality.

#### 2.3.2

 * Fixed: Snippet deletion and database saving issues.

#### 2.3

 * Fixed: Minor bug fixes.

#### 2.2

 * Fixed: Improved script/style loading order.

#### 2.1

 * Fixed: Database save issue resolved.

#### 2.0

 * Added: CodeMirror integration.
 * Optimized: Improved file storage efficiency.
 * Improved: Admin interface styling.

#### 1.1

 * Fixed: Shortcode display issue in content.

#### 1.0

 * Initial release.

## 中繼資料

 *  版本 **4.5**
 *  最後更新 **2 個月前**
 *  啟用安裝數 **10,000+**
 *  WordPress 版本需求 ** 5.4 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/wp-coder/)
 * 標籤
 * [code](https://tw.wordpress.org/plugins/tags/code/)[code-snippets](https://tw.wordpress.org/plugins/tags/code-snippets/)
   [shortcode](https://tw.wordpress.org/plugins/tags/shortcode/)[snippets](https://tw.wordpress.org/plugins/tags/snippets/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wp-coder/advanced/)

## 評分

 4.9 星，滿分為 5 星

 *  [  30 個 5 星使用者評論     ](https://wordpress.org/support/plugin/wp-coder/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/wp-coder/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/wp-coder/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/wp-coder/reviews/?filter=2)
 *  [  1 個 1 星使用者評論     ](https://wordpress.org/support/plugin/wp-coder/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-coder/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/wp-coder/reviews/)

## 參與者

 *   [ Wow-Company ](https://profiles.wordpress.org/wpcalc/)
 *   [ DmtLo ](https://profiles.wordpress.org/lobov/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/wp-coder/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://wpcoder.pro/)