[WordPress] 外掛分享: Terms Block

首頁外掛目錄 › Terms Block
40+
安裝啟用
★★★★
4.8/5 分(4 則評價)
925 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v2.1.0 上架:2020-09-17

內容簡介

顯示一個選定類別法中所有詞彙的清單區塊。

您可以透過在主題中放置範本檔案來更改顯示方式。

template-parts/blocks/terms-block/區塊名稱–區塊樣式.php
template-parts/blocks/terms-block/區塊名稱.php

get_terms的過濾器。

add_filter( 'terms_block_get_terms_arguments', 'my_filter', 10, 3 );
function my_filter( $args, $taxonomy, $attributes ) {
$args = array_merge( $args, array( 'orderby' => 'order' ) );

return $args;
}

外掛標籤

開發者團隊

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

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

原文外掛簡介

Term list block. Displays a list of all terms in the selected taxonomy.
You can change the display by placing a template file in your theme.

template-parts/blocks/terms-block/block-name–block-style.php
template-parts/blocks/terms-block/block-name.php

Filter for get_terms.
add_filter( 'terms_block_get_terms_arguments', 'my_filter', 10, 3 );
function my_filter( $args, $taxonomy, $attributes ) {
$args = array_merge( $args, array( 'orderby' => 'order' ) );

return $args;
}

延伸相關外掛

文章
Filter
Mastodon