[WordPress] 外掛分享: Extra Classes

首頁外掛目錄 › Extra Classes
WordPress 外掛 Extra Classes 的封面圖片
30+
安裝啟用
★★★★★
5/5 分(3 則評價)
3983 天前
最後更新
問題解決
WordPress 3.7+ v0.3.1 上架:2013-02-10

內容簡介

新增遺漏的類別

新增遺漏的選單狀態。新增的類別包括:

current-page-parent 和 current_page_parent
current-page-ancestor 和 current_page_ancestor
current-menu-ancestor
current-menu-parent

以下情況會新增這些類別:

查看附件頁面時,會為任何父頁面和其選單祖先新增類別。
查看文章時,會為任何相關的分類選單項目及其選單祖先新增類別。

管理選單選擇狀態

允許您控制當查看站點的某些頁面時應該選擇(或取消選擇)哪些選單項目。您需要為選單項目新增類別才能使用此功能。

ecms-archive-{$post_type} - 在查看文章類型存檔頁面時選取選單項目。
ecms-single-{$post_type} - 在查看單個文章類型頁面時選取選單項目。
ecms-taxonomy-{$taxonomy} - 在查看税目存檔頁面時選取選單項目。
ecms-taxonomy-{$taxonomy}-term-{$term} - 在查看稅目分類存檔頁面時選取選單項目。

ecms-404 - 在查看 404 頁面時選取選單項目。

ecms-no-archive-{$post_type} - 在查看文章類型存檔頁面時取消選取選單項目。

ecms-no-single-{$post_type} - 在查看單個文章類型頁面時取消選取選單項目。
ecms-no-taxonomy-{$taxonomy} - 在查看税目存檔頁面時取消選取選單項目。
ecms-no-taxonomy-{$taxonomy}-term-{$term} - 在查看稅目分類存檔頁面時取消選取選單項目。
ecms-no-404 - 在查看 404 頁面時取消選取選單項目。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Extra Classes」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Add missing classes
Adds missing classes for selected menu states. Classes added include:

current-page-parent and current_page_parent
current-page-ancestor and current_page_ancestor
current-menu-ancestor
current-menu-parent

The classes are added in the following scenarios:

When viewing an attachment page classes are added to any parent pages and their menu ancestors.
When viewing a post classes are added to any relevant taxonomy menu items and their manu ancestors.

Manage Menu Select States
Allows you to control which menu items should be selected (or deselected) when viewing certain pages of your site. You need to add classes to the menu items for this to work.

ecms-archive-{$post_type} – Select menu item when viewing a post type archive page.
ecms-single-{$post_type} – Select menu item when viewing a single post type page.
ecms-taxonomy-{$taxonomy} – Select menu item when viewing a taxonomy archive.
ecms-taxonomy-{$taxonomy}-term-{$term} – Select menu item when viewing a taxonomy term archive.

ecms-404 – Select menu item when viewing a 404 page.

ecms-no-archive-{$post_type} – Deselect menu item when viewing a post type archive page.

ecms-no-single-{$post_type} – Deselect menu item when viewing a single post type page.
ecms-no-taxonomy-{$taxonomy} – Deselect menu item when viewing a taxonomy archive.
ecms-no-taxonomy-{$taxonomy}-term-{$term} – Deselect menu item when viewing a taxonomy term archive.
ecms-no-404 – Deselect menu item when viewing a 404 page.

延伸相關外掛

文章
Filter
Mastodon