[WordPress] 外掛分享: Category Popular Tags

首頁外掛目錄 › Category Popular Tags
WordPress 外掛 Category Popular Tags 的封面圖片
全新外掛
安裝啟用
尚無評分
6 天前
最後更新
問題解決
WordPress 5.0+ PHP 8.0+ v2.0.2 上架:2019-10-18

內容簡介

Category Popular Tags 外掛提供了一組可自訂樣式的標籤按鈕,能夠在 WordPress 網站的各個地方顯示,包括分類檔案、標籤檔案、作者檔案及個別頁面,提升網站的可用性與互動性。

【主要功能】
• 自動熱門標籤:根據分類自動顯示最常用的標籤
• 自訂按鈕:手動建立標籤按鈕,設定標籤名稱和連結
• 全局樣式系統:統一控制按鈕的外觀設置
• 拖放排序:輕鬆調整按鈕顯示順序
• 實時預覽:即時查看標籤在前端的顯示效果

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.2) 或搜尋安裝

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

原文外掛簡介

Category Popular Tags gives you a fully styled set of tag buttons that can appear anywhere on your WordPress site — category archives, tag archives, author archives, individual pages, WooCommerce product category pages, or embedded directly in post content via shortcode.
There are two types of buttons you can create:

Auto Popular Tags — the plugin queries your posts and surfaces the most-used tags for a given category, ordered by frequency. Drop the shortcode anywhere and it works: on a category archive it shows that category’s popular tags; on any other page it automatically falls back to your site-wide most popular tags.

Custom Buttons — build a hand-picked set of tag buttons with your own labels, URLs, and optional icon images. Drag them into any order and use the generated shortcode to place them exactly where you want.

Both button types share the same global style system, so one set of controls governs the look of everything: colours, hover states, font size, weight, border radius, padding, icon size, column count, gap, box shadow, and text transform.
Admin Panel — Four Tabs
Tab 1 — Custom Buttons
Manually create and manage a list of styled buttons. Each row has:

An optional icon image (uploaded via the WordPress media library)
A text label
A URL

Rows are drag-and-drop reorderable. Once saved, the tab shows a ready-to-copy shortcode. You can also display a specific subset of buttons in any order using [cpt_buttons ids="3,1,2"].
Tab 2 — Auto Popular Tags
Configure the automatic tag discovery:

Set the section title shown above the buttons
Set the default number of tags to display
Toggle sequential number badges on each button
Choose the cache duration (1 hour, 12 hours, 1 day, or 1 week)

A live preview section lets you pick any category from a dropdown and see exactly how the tags will look on the front end — before saving anything. After loading a preview the tab shows you a category-specific shortcode (e.g. [popular_category_tags category_id="3"]) ready to copy.
Tab 3 — Style
Every visual property of the buttons is controlled here:

Button background colour and hover background colour
Font colour and hover font colour
Border colour, border width, and border radius
Font size, font weight, and text transform (none / uppercase / capitalize)
Padding (top/bottom and left/right independently)
Icon size and the gap between the icon and the label text
Gap between buttons on desktop and on mobile independently
Column count on desktop (auto-fit, 1, 2, 3, or 4) and on mobile (1 or 2)
Box shadow toggle

A real-time preview updates as you drag sliders and pick colours — no save required to see the effect.
Tab 4 — Placement
Control where tags appear automatically, without touching any shortcode or theme file:

Category archives — before posts, after posts, both, or after the page title (a JavaScript-based injection that works on any theme)
Tag archives — show site-wide popular tags on tag archive pages
Author archives — show site-wide popular tags on author archive pages
Exclude categories — prevent automatic display on specific categories
WooCommerce (shown only when WooCommerce is active) — auto-display before or after products on product category pages

Shortcodes
Auto popular tags — simplest form:
[popular_category_tags]
Used on a category archive → shows popular tags for that category.
Used anywhere else → shows your site-wide most popular tags automatically.
With specific category:
[popular_category_tags category_id=”5″]
With count and custom title:
[popular_category_tags count=”8″ category_id=”5″ title=”Browse by Topic”]
All available attributes:

category_id — the ID of the category to pull tags from. Omit to auto-detect or fall back to site-wide.
count — number of tags to show. Omit to use the admin default.
title — override the section heading for this instance only.
verbose — set to 1 to output HTML comments useful for debugging.

Custom curated buttons:
[cpt_buttons]
All buttons in saved order.
[cpt_buttons ids="3,1,2"]

Specific buttons in a specific order.
Template Functions
For theme developers who prefer PHP over shortcodes:
cpt_popular_tags( $args )

Renders auto popular tags. Accepts an optional array to override admin defaults:
cpt_popular_tags( array(
'category_id' => 5,
'count' => 6,
'title' => 'Related Topics',
) );

cpt_custom_buttons( $args )

Renders the custom buttons created in Tab 1. Accepts an optional ids array to filter and reorder:
cpt_custom_buttons( array( 'ids' => array( 3, 1, 2 ) ) );

Backwards Compatibility
If you were using the plugin before version 2.0, nothing breaks:

[popular_category_tags] and all its original attributes (count, category_id, category_name, type) work exactly as before.
The legacy theme function cush_category_popular_tag() is still available as an alias for cpt_popular_tags().
Existing settings are automatically migrated on upgrade — no manual action required.

Credit
Popular tag query logic originally inspired by:
https://wordpress.stackexchange.com/questions/261617/display-most-popular-tags-of-category

延伸相關外掛

文章
Filter
Apply Filters
Mastodon