[WordPress] 外掛分享: Taxonomy Chain Menu

前言介紹

  • 這款 WordPress 外掛「Taxonomy Chain Menu」是 2021-02-24 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2025-04-29,距離現在已有 4 天。
  • 外掛最低要求 WordPress 4.1.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

realmag777 |

外掛標籤

menu | filter | taxonomy | taxonomy menu | product filter |

內容簡介

Taxonomy Chain Menu 是一個WordPress外掛,具有一個簡短代碼,允許使用WordPress分類的下拉菜單創建分類樹鏈菜單。

Taxonomy Chain Menu 可用作一個簡短代碼:[taxonomy_chain_menu],其中包含許多屬性,如下所述。
與WOOF篩選行為兼容!

演示網頁:

演示網頁 1
演示準備好的鏈 (高級功能)
與 TABLEON 兼容
與 PROTAS兼容
與 WOOF兼容

最新的 PHP 8.x - 兼容!

Taxonomy Chain Menu 功能(簡短代碼屬性):

✅ post_slug:用於串鍵菜單的文章類型。默認快捷方法為“post”。

✅ taxonomy:導航的分類。默認分類為“category”。

✅ parent_id:起始分類 ID,0表示頂級父分類。默認刻度為 0。

✅ exclude:要從鏈中隱藏的類別 ID。例如:12,44,73。

✅ include:要顯示的類別 ID。與“exclude”相反。例如:11,43,72。

✅ include_top:僅與頂級父類別相關的類別 ID(parent == 0)。例如:10,42,71。

✅ show_count:顯示/隱藏下拉菜單中類別中帖子的計數。默認值為0。

✅ watch_view:值:“posts”,“terms”,“none”。在鏈的結尾上顯示什麼。文章-帶有文章的下拉菜單。條款-按鈕,其鏈接到最後一個下拉菜單中所選條款的文章。無 - 產品表過濾中應用的好處。

✅ label_taxonomy:下拉菜單的標籤。例如:“生產商”。還可以使用自定義操作(必須始於“call_filter_”)進行翻譯,示例:[taxonomy_chain_menu label_taxonomy=’call_filter_chain1′ label_post=’call_filter_chain1-post’]。在functions.php文件中添加以下代碼:

add_filter('chain1', function($args) {

$res = '生產商';
//為WPML兼容性而示例
if (defined('ICL_LANGUAGE_CODE')) {
switch (ICL_LANGUAGE_CODE) {
case 'es':
$res = 'Productor';
break;
case 'uk':
$res = 'Виробник';
break;
}
}

return $res;
}, 10, 1);

✅ label_post:文章下拉菜單的標籤。為了在functions.php文件中使用操作而不是文本,請添加以下代碼:(必須始於“call_filter_”)

add_filter('chain1-post', function($args) {

$res = '選擇汽車';
//為WPML兼容性而示例
if (defined('ICL_LANGUAGE_CODE')) {
switch (ICL_LANGUAGE_CODE) {
case 'es':
$res = 'Seleccionar coche';
break;
case 'uk':
$res = 'Яке твое а

原文外掛簡介

Taxonomy Chain Menuis a WordPress plugin that provides a single shortcode for creating chained dropdown menus of taxonomy terms, using either built-in or custom WordPress taxonomies.
Taxonomy Chain Menu is available as one shortcode: [taxonomy_chain_menu] with heap of attributes described below.
Compatible with WOOF filtration behavior!
Demo Pages:

Demo page 1
Demo Ready Chain
Compatible with TABLEON
Compatible with WOOT
Compatible with WOOF

Latest PHP 8.x – COMPATIBLE!
Taxonomy Chain Menu Features (shortcode attributes):
✅ post_slug: post type to use in the chain menu. Default slug is ‘post’.
✅ taxonomy: taxonomy terms to navigate. Default taxonomy is ‘category’.
✅ parent_id: started term ID, 0 means top parents. Default slug is 0.
✅ exclude: terms ids to hide from the chain. For example: 12,44,73.
✅ include: terms ids to show. Opposite to ‘exclude’. For example: 11,43,72.
✅ include_top: terms ids related to the top parent terms only (parent == 0). For example: 10,42,71.
✅ show_count: show/hide count of posts in the terms in drop-downs options. Default value is 0.
✅ watch_view: values: ‘posts’, ‘terms’, ‘none’. What to show on the end of the chain. Posts – drop-down with posts. Terms – button with the link to posts of the selected term in the last drop-down. None – nothing, good to apply with products tables filtering.
✅ label_taxonomy: label(s) of the drop-down(s). Example: ‘Producer’. Also it is possible to use custom actions (must started from ‘call_filter_’) for translations, example: [taxonomy_chain_menu label_taxonomy=’call_filter_chain1′ label_post=’call_filter_chain1-post’]. In file functions.php add next code:
add_filter('chain1', function($args) {

$res = 'Producer';
//for WPML compatibility as an example
if (defined('ICL_LANGUAGE_CODE')) {
switch (ICL_LANGUAGE_CODE) {
case 'es':
$res = 'Productor';
break;
case 'uk':
$res = 'Виробник';
break;
}
}

return $res;
}, 10, 1);

✅ label_post: label of the posts drop-down. To use action instead of text in file functions.php add next code: (must started from ‘call_filter_’)
add_filter('chain1-post', function($args) {

$res = 'Select car';
//for WPML compatibility as an example
if (defined('ICL_LANGUAGE_CODE')) {
switch (ICL_LANGUAGE_CODE) {
case 'es':
$res = 'Seleccionar coche';
break;
case 'uk':
$res = 'Яке твое авто';
break;
default:
$res = 'Select your car';
break;
}
}

return $res;
}, 10, 1);

✅ button_title: title of the button at the end of the chain. By default it is ‘GO!’. Also is possible to use action (must started from ‘call_filter_’), example: [taxonomy_chain_menu post_slug=’product’ taxonomy=’product_cat’ button_title=’call_filter_chain1-btn’]
add_filter('chain1-btn', function($args) {

$res = 'Take it!';
//for WPML compatibility as an example
if (defined('ICL_LANGUAGE_CODE')) {
switch (ICL_LANGUAGE_CODE) {
case 'es':
$res = 'Tomar lo!';
break;
case 'uk':
$res = 'Забираймо!';
break;
}
}

return $res;
}, 10, 1);

✅ chain_id: (for developers)unique JavaScript identifier for javascript event ‘taxonomy-chain-menu’ and in custom WordPress actions
✅ connect_table: unique identifier of posts/products table (TABLEON or WOOT) set in table shortcode attribute or its backend settings. It is possible to use Taxonomy Chain Menu as filter with posts and products table plugins: TABLEON – WordPress Posts Table Filterable and WOOT – WooCommerce Products Table
Such scripts cooperation is possible thanks to JavaScript event ‘taxonomy-chain-menu’ and shortcode attributes ‘chain_id’ with attribute ‘connect_table’
✅ do_filter: accepts from the box only one value – ‘woof’ (demo), but it is possible to adapt any another wordpress/woocommerce filter plugin (for developers) using js event taxonomy-chain-menu-do-filter and values there: e.detail.term_id, e.detail.slug, e.detail.container. Example: [taxonomy_chain_menu post_slug=’product’ taxonomy=’product_cat’ do_filter=’woof’]
✅ select_width: widths for drop-downs in chain. Use one value or some separated by ‘|’. Examples: ‘300px’, ‘300px|250px|20%’. Last value is actual for drop-downs in chain with number 3 and more.
✅ max_posts_count: set maximum count of posts in posts drop-down
✅ posts_orderby: how to order posts in posts drop-down (by title, id, meta). By default: title.
✅ posts_order: posts order direction in posts drop-down. Possible values: ASC, DESC
✅ posts_order_meta_key: here is meta key by which posts in posts drop-down should be ordered. Be care – meta values should exist in the requested posts. Example: [taxonomy_chain_menu post_slug=’product’ taxonomy=’product_cat’ posts_orderby=’meta_value_num’ posts_order_meta_key=’prod_1′ posts_order=’DESC’]
✅ no jQuery – pure JavaScript!
✅ Shortcode example [taxonomy_chain_menu post_slug=’product’ taxonomy=’product_cat’ show_count=1 exclude=’1′ include_top2=’17’ parent_id2=17 target=’_blank’ watch_view2=’terms’ label_taxonomy=’call_filter_chain1′ label_post=’call_filter_chain1-post’ chain_id=’chain1′ connect_table=’asdfgh’ ready_chain=’17,18,0′ button_title=’call_filter_chain1-btn’ do_filter2=’woof’ label_before2=’call_filter_chain1-before’ select_wrapper=’selectron23′ max_posts_count2=2 posts_orderby2=’meta_value_num’ posts_order_meta_key2=’prod_1′ selectron23_max_open_height=’150|200|220′ select_width=’300px|200px|350px’]
✅ All features above
✅ target: how to open selected post/terms page. Default is: ‘_self’ (opening in the same browser tab). To open in another tab use: ‘_blank’
✅ syntax for label_taxonomy: as an example – ‘Producer|Model’, such syntax allows to set individual title for each drop-down in the chain
✅ label_before: any words before first drop-down. Also it is possible to set text through action (must started from ‘call_filter_’): ([taxonomy_chain_menu post_slug=’product’ taxonomy=’product_cat’ label_before=’call_filter_chain1-before’])
✅ ready_chain: allows to display pre-selected values in the chain menu, example – [taxonomy_chain_menu watch_view=’posts’ ready_chain=’17,20,post(51)’] – at the end of the chain will be displayed drop-down with posts and button with the link to the selected post. If exists more sub-categories use 0 (zero) at the end: [taxonomy_chain_menu ready_chain=’17,20,0′]. See example.
✅ select_wrapper: has only one value ‘selectron23’ and allows to wrap drop-down in reach html-element Selectron23. Just look an example please to understand!
✅ Compatible with WPML automatically, no actions need.
Make your site more powerful with next scripts:
✅ WOOF – Products Filter for WooCommerce: is an extendable, flexible and robust plugin for WooCommerce that allows your site customers filter products by products categories, attributes, tags, custom taxonomies and price. Supports latest version of the WooCommerce plugin. A must have plugin for your WooCommerce powered online store! Maximum flexibility!
✅ WOOCS – WooCommerce Currency Switcher: is WooCommerce multi currency plugin, that allows your shop customers switch products prices currency according to the set rates in the real time and pay in the selected currency (optionally). Allows to add any currency to you WooCommerce store! The best woo currency switcher plugin for WooCommerce e-shop!
✅ BEAR – Bulk Editor for WooCommerce: WordPress plugin for managing and bulk edit WooCommerce Products data in robust and flexible way! Be professionals with managing data of your woocommerce e-shop!
✅ WPBE – WordPress Posts Bulk Editor Professional: is WordPress plugin for managing and bulk edit WordPress posts, pages and custom post types data in robust and flexible way! Be professionals with managing data of your site!
✅ WOOT – WooCommerce Active Products Tables: is WooCommerce plugin for displaying shop products in table format. Tables makes focus for your buyers on the things they want to get, nothing superfluous, just what the client wants, and full attention to what is offered!
✅ TABLEON – WordPress Post Tables Filterable: WordPress plugin for displaying site posts and their custom post types in table format. Tables makes focus for your customers on the things they want to get, nothing superfluous, just what the client wants, and full attention to what is offered!
✅ MDTF – WordPress Meta Data Filter & Taxonomies Filter: the plugin for filtering and searching WordPress content in posts and their custom types by taxonomies and meta data fields. The plugin has very high flexibility thanks to its rich filter elements and in-built meta fields constructor!
✅ WPCS – WordPress Currency Switcher: is a WordPress plugin that allows to switch currencies and get their rates converted in the real time on your site!
License
This plugin is copyright pluginus.net © 2012-2025 with GNU General Public License by realmag777.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU General Public License for more details.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Taxonomy Chain Menu」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon