Title: Pagelean &#8211; Conditional Script and Style Loading
Author: Mariusz Szatkowski
Published: <strong>2026 年 10 月 6 日</strong>
Last modified: 2026 年 10 月 6 日

---

搜尋外掛

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

![](https://ps.w.org/pagelean/assets/icon-256x256.png?rev=3729962)

# Pagelean – Conditional Script and Style Loading

 由 [Mariusz Szatkowski](https://profiles.wordpress.org/motylanogha/) 開發

[下載](https://downloads.wordpress.org/plugin/pagelean.1.1.2.zip)

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

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

## 外掛說明

Most plugins load their CSS and JavaScript on every page, even where their feature
never appears. A contact form script on your checkout, a slider stylesheet on your
blog posts, a social-share bundle on your privacy policy. That weight slows every
visit.

Pagelean lets you remove a specific script or style from exactly the pages where
it is not needed – front page, blog index, single posts and pages (by ID), or by
device. It uses the standard WordPress enqueue system (`wp_dequeue_script` / `wp_dequeue_style`),
so there is no page-builder lock-in and nothing proprietary to learn.

#### What it does

 * Remove any registered script or style handle by name.
 * Choose _where_ it is removed: everywhere, the front page, the blog posts index,
   single posts/pages (by ID), or only mobile / only desktop.
 * Autocomplete hints from the handles registered on your site.
 * Runs late on the front end so it removes handles reliably, and never touches 
   the admin.

#### What it does not do

It does not minify, combine or defer. It removes what you tell it to remove – nothing
automatic, nothing hidden. Removing a handle that another script depends on can 
break functionality, so change one rule at a time and check the front end.

#### Part of the Plogins family

Pagelean is one of a family of small, focused WordPress and WooCommerce plugins 
by WPPoland. Learn more at [plogins.com](https://plogins.com/).

## 螢幕擷圖

[⌊The rule table: remove a handle on the pages that do not need it.⌉⌊The rule table:
remove a handle on the pages that do not need it.⌉[

The rule table: remove a handle on the pages that do not need it.

## 安裝方式

 1. Upload the plugin to `/wp-content/plugins/pagelean`, or install it from the Plugins
    screen.
 2. Activate it.
 3. Go to **Pagelean** in the main admin menu.
 4. Add a rule: type the handle, pick script or style, and choose where to remove it.
 5. Save, then check the front end.

## 常見問題集

### How do I find a handle name?

Open the page in your browser, view source or the Network tab, and look at the `
id` attribute of the `<script>` / `<link>` tags – it usually ends in `-js` or `-
css` (the handle is that value without the suffix). The settings screen also offers
autocomplete from the handles currently registered on your site.

### When do the Post/Page IDs apply?

Only to the two single posts/pages conditions. The other conditions (everywhere,
front page, blog index, mobile, desktop) decide from the request alone, so the IDs
box is greyed out for them and a rule set that way removes the handle on every page
it matches.

### Will this break my site?

It only removes what you configure. If a handle you remove is a dependency of another
script, that other script may stop working. Change one rule at a time and verify
the front end. You can remove a rule to restore the asset instantly.

### Does it work without a page builder or WooCommerce?

Yes. It uses WordPress core functions only and works on any theme.

### Does it run in the admin?

No. Rules apply on the front end only.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Pagelean – Conditional Script and Style Loading〉的開發相關
工作。

參與者

 *   [ Mariusz Szatkowski ](https://profiles.wordpress.org/motylanogha/)

[將〈Pagelean – Conditional Script and Style Loading〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/pagelean)

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

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

## 變更記錄

#### 1.1.2

 * The settings form sanitises every rule field as it is read, and the saved notice
   only shows for the exact value the plugin sets.

#### 1.1.1

 * Renamed to Pagelean, a plain English name in place of the Esperanto one. The 
   text domain and the plugin folder follow the name; the stored settings, options
   and every hook are unchanged.
 * The autoloader no longer leaves a global variable behind.

#### 1.1.0

 * Renamed to Malpezo. The WordPress.org review team asks a plugin name to lead 
   with a distinctive, coined identifier rather than a generic descriptive word.
   Malpezo is Esperanto for lightness. The text domain follows the name; the stored
   rules, the settings and every hook are unchanged.

#### 1.0.5

 * The translation template was regenerated. It still named an older version of 
   the plugin and pointed at source lines that had since moved, which is what translation
   tools read to show a string in context.

#### 1.0.4

 * Tested against WordPress 7.1. Verified by activating this build on a clean 7.1
   install with WooCommerce 11.1, not by editing the header.

#### 1.0.3

 * The Post/Page IDs box is now available only for the two single posts/pages conditions,
   the ones that can act on it. With any other condition it is greyed out with a
   short note, so a rule set to Everywhere or to a device can no longer look as 
   if it were limited to a few pages while the handle is in fact removed across 
   the whole site.

#### 1.0.1

 * Version bump to meet the family release floor for the WordPress.org submission.

#### 1.0.0

 * Initial release.

## 中繼資料

 *  版本 **1.1.2**
 *  最後更新 **1 週前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.1.3**
 *  PHP 版本需求 ** 8.1 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/pagelean/)
 * 標籤:
 * [assets](https://tw.wordpress.org/plugins/tags/assets/)[optimization](https://tw.wordpress.org/plugins/tags/optimization/)
   [performance](https://tw.wordpress.org/plugins/tags/performance/)[scripts](https://tw.wordpress.org/plugins/tags/scripts/)
   [styles](https://tw.wordpress.org/plugins/tags/styles/)
 *  [進階檢視](https://tw.wordpress.org/plugins/pagelean/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/pagelean/reviews/#new-post)

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

## 參與者

 *   [ Mariusz Szatkowski ](https://profiles.wordpress.org/motylanogha/)

## 技術支援

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

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